Creo que ya deje las ordenes listas

This commit is contained in:
Daniel Cortés
2019-07-03 12:08:24 -04:00
parent 6b4f55d752
commit c9dfd7f3ad
18 changed files with 1034 additions and 76 deletions

View File

@@ -38,6 +38,7 @@ drop table if exists boleta;
drop table if exists compra;
drop table if exists venta;
drop table if exists arriendo;
drop table if exists libro_orden_compra;
drop table if exists ejemplar_compra;
drop table if exists ejemplar_venta;
drop table if exists ejemplar_arriendo;
@@ -275,22 +276,20 @@ create table trabajador_correo
create table factura
(
id int unsigned primary key auto_increment,
folio varchar(255) not null,
precio_neto int not null,
precio_iva int not null,
fecha_compra datetime not null,
inserted_at timestamp default CURRENT_TIMESTAMP
id int unsigned primary key auto_increment,
folio varchar(255) not null,
precio_neto int not null,
fecha_emision datetime not null,
inserted_at timestamp default CURRENT_TIMESTAMP
);
create table boleta
(
id int unsigned primary key auto_increment,
folio varchar(255) not null,
precio_neto int not null,
precio_iva int not null,
fecha_venta datetime not null,
inserted_at timestamp default CURRENT_TIMESTAMP
id int unsigned primary key auto_increment,
folio varchar(255) not null,
precio_neto int not null,
fecha_emision datetime not null,
inserted_at timestamp default CURRENT_TIMESTAMP
);
create table orden_compra
@@ -311,7 +310,7 @@ create table compra
distribuidor_id int unsigned not null,
inserted_at timestamp default CURRENT_TIMESTAMP,
foreign key (factura_id) references factura (id) on delete restrict on update cascade,
foreign key (distribuidor_id) references cliente (id) on delete restrict on update cascade
foreign key (distribuidor_id) references distribuidor (id) on delete restrict on update cascade
);
create table venta