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

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; 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'));