use island42;
drop table if exists access;

create table access (
  id int(11) NOT NULL auto_increment,
  user_id int(11) NOT NULL,
  access_type_id int(11) NOT NULL,
  PRIMARY KEY (id)
) type=InnoDB;

create index access_i1 on access(user_id);
create index access_i2 on access(access_type_id);
create unique index access_i3 on access(user_id, access_type_id);