Mejorado el asunto en docker

This commit is contained in:
2021-07-09 01:11:04 -04:00
parent 450a171827
commit 81a1fa5115
3 changed files with 20 additions and 24 deletions

View File

@@ -381,4 +381,4 @@ select ingrediente_id as ingrediente_id, sum(unidades) as stock, restaurante_id
from bodega_movimientos
group by bodega_movimientos.ingrediente_id, bodega_movimientos.restaurante_id;
commit;
commit;

18
database/init/01-data.sql Normal file
View File

@@ -0,0 +1,18 @@
insert into estados_produccion (nombre)
values ('Enviada'),
('Preparada'),
('Vendida'),
('Mermada'),
('Devuelta');
insert into tipos_canal (nombre)
values ('Mesa'),
('Delivery');
insert into medios_pago (nombre)
values ('Efectivo'),
('Tarjeta de Credito'),
('Tarjeta de Debito');
insert into usuarios (auth0_id, nombre)
values ('auth0|6083af726b4de900695cb232', 'Daniel Cortés');

View File

@@ -1,24 +1,5 @@
start transaction;
-----------------------------------
--- Inserts basicos
-----------------------------------
insert into estados_produccion (nombre)
values ('Enviada'),
('Preparada'),
('Vendida'),
('Mermada'),
('Devuelta');
insert into tipos_canal (nombre)
values ('Mesa'),
('Delivery');
insert into medios_pago (nombre)
values ('Efectivo'),
('Tarjeta de Credito'),
('Tarjeta de Debito');
-----------------------------------
--- Creando restaurant de prueba
-----------------------------------
@@ -53,9 +34,6 @@ insert into zonas_produccion (nombre, restaurante_id)
values ('Cocina', (select id from restaurantes where nombre = 'Todo Rico Restaurant')),
('Barra', (select id from restaurantes where nombre = 'Todo Rico Restaurant'));
insert into usuarios (auth0_id, nombre)
values ('auth0|6083af726b4de900695cb232', 'Test');
insert into usuarios_restaurantes (usuario_id, restaurante_id)
values ((select id from usuarios where nombre = 'Test'), (select id from restaurantes where nombre = 'Todo Rico Restaurant'));
@@ -169,4 +147,4 @@ values (current_timestamp, null, (select id from ventas limit 1), (select id fro
(current_timestamp, null, (select id from ventas limit 1), (select id from productos where nombre = 'Chuleta con Pure'),
(select id from estados_produccion where nombre = 'Enviada'));
commit;
commit;