create table if not exists app( id int not null auto_increment, ruta varchar(200), endpoint varchar (200), nombre varchar(200), primary key (id) )ENGINE=InnoDB DEFAULT CHARSET=utf8; create table if not exists colaborador_app( id int not null auto_increment, app int not null, wikiname varchar(200) not null, primary key (id), foreign key(app) references app(id), foreign key(wikiname) references colaborador(wikiname) )ENGINE=InnoDB DEFAULT CHARSET=utf8; create table if not exists solicitud_acceso( id int not null auto_increment, wikiname varchar(200) not null, app int not null, email varchar(200), phone varchar(25), razon varchar(500), acceso varchar(20) default null, /*Aceptado, Rechazado*/ estatus varchar(20), /*Abierto, Proceso, Cerrado*/ descripcion varchar(500) default null, fecha_creado datetime default null, fecha_cierre datetime default null, acceso_id int, primary key (id), foreign key (app) references app(id), foreign key (wikiname) references colaborador(wikiname), foreign key (acceso_id) references colaborador_app(id) )ENGINE=InnoDB DEFAULT CHARSET=utf8; insert into app(id, ruta, endpoint, nombre) values (NULL, 'https://genniux.net/app/accesos', '/app/accesos', 'accesos'); insert into colaborador_app(id, app, wikiname) values(NULL, 1, 'JahazielBaltazar');