   offers_seats                int null,
   needs_driver                int null
 ) Type=InnoDB
-alter table event_attendee add foreign key event_id references event(event_id)
-alter table event_attendee add foreign key player_id references player(player_id)
+alter table event_attendee add foreign key (event_id) references event(event_id)
+alter table event_attendee add foreign key (player_id) references player(player_id)
 alter table event_attendee add index (event_id)
 alter table event_attendee add index (player_id)
 alter table event_attendee add unique index (event_id, player_id)

  
  points                      int null
) Type=InnoDB
alter table event_points add foreign key event_id references event(event_id)
alter table event_points add foreign key player_id references player(player_id)
alter table event_points add index (player_id)

create table right (
  right_id                    int auto_increment primary_key,
  name                        varchar(50) not null
) Type=InnoDB
insert into right values ("create_player");
insert into right values ("create_event")
insert into right values ("create_news")

create table plane_right_matrix (
  right_id                    int not null,
  player_id                   int not null
) Type=InnoDB
alter table plane_right_matrix add index (player_id)
alter table plane_right_matrix add unique index (right_id, player_id)
alter table plane_right_matrix add foreign key right_id references right(right_id)
alter table plane_right_matrix add foreign key player_id references player(player_id)

  event_type_id               int not null
) Type=InnoDB
alter table event add index (target_date)
alter table event add foreign key (team_id) references team(team_id)
alter table event add foreign key (event_type_id) references event_type(event_type_id)

create table event_attendee (
  event_id                    int not null,
