6 lines
706 B
SQL
6 lines
706 B
SQL
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; |