muchos cambios en el objetivo que se puedan crear usuarios
Todo por ellos <3 La gracia es que al ver un trabajador te da la opcion de usuario, dentro de ella si es que no tiene un usuario creado puede crear uno, y una vez creado, pasa a ver su nombre de usuario y desde esa vista, puede ir a editar su usuario cambiando su nombre y contraseña a gusto, me gustaria poder poner un placeholder en el campo de la contraseña pero no me deja :c
This commit is contained in:
16
script.sql
16
script.sql
@@ -13,6 +13,7 @@ drop table if exists ejemplar;
|
||||
drop table if exists libro_autor;
|
||||
drop table if exists libro_categoria;
|
||||
drop table if exists libro_idioma;
|
||||
drop table if exists correo;
|
||||
drop table if exists direccion;
|
||||
drop table if exists telefono;
|
||||
drop table if exists empresa;
|
||||
@@ -21,10 +22,13 @@ drop table if exists cliente;
|
||||
drop table if exists trabajador;
|
||||
drop table if exists distribuidor_direccion;
|
||||
drop table if exists distribuidor_telefono;
|
||||
drop table if exists distribuidor_correo;
|
||||
drop table if exists cliente_direccion;
|
||||
drop table if exists cliente_telefono;
|
||||
drop table if exists cliente_correo;
|
||||
drop table if exists trabajador_direccion;
|
||||
drop table if exists trabajador_telefono;
|
||||
drop table if exists trabajador_correo;
|
||||
drop table if exists factura;
|
||||
drop table if exists boleta;
|
||||
drop table if exists compra;
|
||||
@@ -355,9 +359,9 @@ create table libro_arriendo
|
||||
create table usuario
|
||||
(
|
||||
id int unsigned primary key auto_increment,
|
||||
nombre varchar(255) not null,
|
||||
password varbinary(2000) not null,
|
||||
trabajador_id int unsigned not null,
|
||||
nombre varchar(255) not null,
|
||||
password varchar(255) not null,
|
||||
trabajador_id int unsigned not null,
|
||||
foreign key (trabajador_id) references trabajador (id) on delete cascade on update cascade,
|
||||
inserted_at timestamp default current_timestamp
|
||||
);
|
||||
@@ -437,3 +441,9 @@ values (1, 2),
|
||||
(7, 2),
|
||||
(8, 2),
|
||||
(9, 2);
|
||||
|
||||
INSERT INTO trabajador
|
||||
VALUES (1, '197638990', 'Daniel', 'Cortes', 'Pincheira', '2019-06-04', '2019-06-04 18:12:55');
|
||||
|
||||
INSERT INTO usuario
|
||||
VALUES (1, 'admin', 'IF7nbMo9zxGOH++0op8eE+obeILVzsZCguAqPVydL/0=', 1, '2019-06-05 00:08:50');
|
||||
|
||||
Reference in New Issue
Block a user