Se agrego el miodelo de detalle

This commit is contained in:
Daniel Cortés
2019-05-20 12:14:18 -04:00
parent e6b0bfaa27
commit 587d06b12a
14 changed files with 681 additions and 1 deletions

6
database/3.sql Normal file
View File

@@ -0,0 +1,6 @@
drop table if exists tipos_detalle;
drop table if exists detalles;
create table tipos_detalle (id integer primary key, nombre text);
create table detalles(id integer primary key, valor integer not null, descripcion text not null, tipo_detalle_id integer not null, estado_resultado_id integer not null, foreign key (estado_resultado_id) references estado_resultado (id) on update cascade on delete restrict, foreign key (tipo_detalle_id) references tipos_detalle (id) on update cascade on delete restrict);
insert into tipos_detalle (nombre) values ('Agua'), ('Luz'), ('Gas'), ('Telefono'), ('Otro'), ('CTA CTE Con Factura'), ('CTA CTE Con Boleta'), ('CTA CTE Sin Respaldo');
update version set version = 3;