Mejorado el asunto en docker
This commit is contained in:
@@ -381,4 +381,4 @@ select ingrediente_id as ingrediente_id, sum(unidades) as stock, restaurante_id
|
|||||||
from bodega_movimientos
|
from bodega_movimientos
|
||||||
group by bodega_movimientos.ingrediente_id, bodega_movimientos.restaurante_id;
|
group by bodega_movimientos.ingrediente_id, bodega_movimientos.restaurante_id;
|
||||||
|
|
||||||
commit;
|
commit;
|
||||||
18
database/init/01-data.sql
Normal file
18
database/init/01-data.sql
Normal 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');
|
||||||
@@ -1,24 +1,5 @@
|
|||||||
start transaction;
|
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
|
--- 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')),
|
values ('Cocina', (select id from restaurantes where nombre = 'Todo Rico Restaurant')),
|
||||||
('Barra', (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)
|
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'));
|
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'),
|
(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'));
|
(select id from estados_produccion where nombre = 'Enviada'));
|
||||||
|
|
||||||
commit;
|
commit;
|
||||||
Reference in New Issue
Block a user