update fixtures and schema
This commit is contained in:
parent
a218cbf0e1
commit
f6a7efae0c
|
@ -1,2 +1 @@
|
||||||
connect.ini
|
connect.ini
|
||||||
docker.log
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ else
|
||||||
|
|
||||||
# Import fixtures
|
# Import fixtures
|
||||||
echo "Imported fixtures.sql"
|
echo "Imported fixtures.sql"
|
||||||
mysql -u root -proot < dump/fixtures.sql
|
mysql -u root -proot -f < dump/fixtures.sql
|
||||||
|
|
||||||
# Copy dumpted data to volume
|
# Copy dumpted data to volume
|
||||||
cp -R /var/lib/mysql /data
|
cp -R /var/lib/mysql /data
|
||||||
|
|
|
@ -23,8 +23,9 @@ VIEW `vn`.`item` AS
|
||||||
`t`.`relevancy` AS `relevancy`,
|
`t`.`relevancy` AS `relevancy`,
|
||||||
`t`.`Foto` AS `image`,
|
`t`.`Foto` AS `image`,
|
||||||
`t`.`generic` AS `generic`,
|
`t`.`generic` AS `generic`,
|
||||||
|
`t`.`density` AS `density`,
|
||||||
`t`.`iva_group_id` AS `taxClassFk`,
|
`t`.`iva_group_id` AS `taxClassFk`,
|
||||||
`t`.`pvp` AS `pvp`,
|
`t`.`PVP` AS `minPrice`,
|
||||||
`t`.`min` AS `min`
|
`t`.`Min` AS `hasMinPrice`
|
||||||
FROM
|
FROM
|
||||||
`vn2008`.`Articles` `t`;
|
`vn2008`.`Articles` `t`;
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
USE `vn`;
|
||||||
|
CREATE
|
||||||
|
OR REPLACE ALGORITHM = UNDEFINED
|
||||||
|
DEFINER = `root`@`%`
|
||||||
|
SQL SECURITY DEFINER
|
||||||
|
VIEW `vn`.`agencyProvince` AS
|
||||||
|
SELECT
|
||||||
|
`a`.`province_id` AS `provinceFk`,
|
||||||
|
`a`.`agency_id` AS `agencyFk`,
|
||||||
|
`a`.`zona` AS `zone`,
|
||||||
|
`a`.`warehouse_id` AS `warehouseFk`,
|
||||||
|
`a`.`route` AS `route`
|
||||||
|
FROM
|
||||||
|
`vn2008`.`Agencias_province` `a`;
|
|
@ -0,0 +1,16 @@
|
||||||
|
USE `vn`;
|
||||||
|
CREATE
|
||||||
|
OR REPLACE ALGORITHM = UNDEFINED
|
||||||
|
DEFINER = `root`@`%`
|
||||||
|
SQL SECURITY DEFINER
|
||||||
|
VIEW `vn`.`agencyModeZone` AS
|
||||||
|
SELECT
|
||||||
|
`a`.`Id_Agencia` AS `agencyModeFk`,
|
||||||
|
`a`.`zona` AS `zone`,
|
||||||
|
`a`.`price` AS `price`,
|
||||||
|
`a`.`Id_Article` AS `itemFk`,
|
||||||
|
`a`.`warehouse_id` AS `warehouseFk`,
|
||||||
|
`a`.`porte_minimo` AS `minimCost`,
|
||||||
|
`a`.`inflacion` AS `inflation`
|
||||||
|
FROM
|
||||||
|
`vn2008`.`Agencias_zonas` `a`;
|
|
@ -0,0 +1,15 @@
|
||||||
|
USE `vn`;
|
||||||
|
CREATE
|
||||||
|
OR REPLACE ALGORITHM = UNDEFINED
|
||||||
|
DEFINER = `root`@`%`
|
||||||
|
SQL SECURITY DEFINER
|
||||||
|
VIEW `vn`.`agencyWeekdayBonus` AS
|
||||||
|
SELECT
|
||||||
|
`a`.`id` AS `id`,
|
||||||
|
`a`.`warehouse_id` AS `warehouseFk`,
|
||||||
|
`a`.`agency_id` AS `agencyFk`,
|
||||||
|
`a`.`weekDay` AS `weekDay`,
|
||||||
|
`a`.`zona` AS `zone`,
|
||||||
|
`a`.`bonus` AS `bonus`
|
||||||
|
FROM
|
||||||
|
`vn2008`.`agency_weekday_bonus` `a`;
|
|
@ -0,0 +1,12 @@
|
||||||
|
USE `vn`;
|
||||||
|
CREATE
|
||||||
|
OR REPLACE ALGORITHM = UNDEFINED
|
||||||
|
DEFINER = `root`@`%`
|
||||||
|
SQL SECURITY DEFINER
|
||||||
|
VIEW `vn`.`preparationPercentage` AS
|
||||||
|
SELECT
|
||||||
|
`p`.`week_day` AS `weekDay`,
|
||||||
|
`p`.`warehouse_id` AS `warehouseFk`,
|
||||||
|
`p`.`percentage` AS `percentage`
|
||||||
|
FROM
|
||||||
|
`vn2008`.`preparation_percentage` `p`;
|
|
@ -0,0 +1,12 @@
|
||||||
|
USE `vn`;
|
||||||
|
CREATE
|
||||||
|
OR REPLACE ALGORITHM = UNDEFINED
|
||||||
|
DEFINER = `root`@`%`
|
||||||
|
SQL SECURITY DEFINER
|
||||||
|
VIEW `vn`.`preparationException` AS
|
||||||
|
SELECT
|
||||||
|
`p`.`exception_day` AS `exceptionDay`,
|
||||||
|
`p`.`warehouse_id` AS `warehouseFk`,
|
||||||
|
`p`.`percentage` AS `percentage`
|
||||||
|
FROM
|
||||||
|
`vn2008`.`preparation_exception` `p`;
|
|
@ -613,3 +613,34 @@ INSERT INTO `vn`.`entry`(`id`, `supplierFk`, `created`, `travelFk`, `companyFk`)
|
||||||
( 2, 2, CURDATE(), 2, 442),
|
( 2, 2, CURDATE(), 2, 442),
|
||||||
( 3, 1, CURDATE(), 3, 442),
|
( 3, 1, CURDATE(), 3, 442),
|
||||||
( 4, 2, CURDATE(), 4, 69);
|
( 4, 2, CURDATE(), 4, 69);
|
||||||
|
|
||||||
|
INSERT INTO `vn`.`agencyProvince`(`provinceFk`, `agencyFk`, `zone`, `warehouseFk`, `route`)
|
||||||
|
VALUES
|
||||||
|
( 1, 1, 1, 1, 1),
|
||||||
|
( 1, 1, 1, 2, 1),
|
||||||
|
( 1, 1, 1, 3, 1),
|
||||||
|
( 1, 2, 2, 2, 2),
|
||||||
|
( 1, 2, 2, 3, 2);
|
||||||
|
|
||||||
|
INSERT INTO `vn`.`agencyModeZone`(`agencyModeFk`, `zone`, `price`, `itemFk`, `warehouseFk`, `minimCost`, `inflation`)
|
||||||
|
VALUES
|
||||||
|
( 1, 1, 10, 1, 1, 1, 1.00),
|
||||||
|
( 1, 1, 20, 2, 1, 1, 1.00),
|
||||||
|
( 2, 1, 10, 1, 1, 1, 1.00),
|
||||||
|
( 2, 1, 20, 2, 1, 1, 2.00),
|
||||||
|
( 2, 2, 10, 1, 1, 0, 2.00);
|
||||||
|
|
||||||
|
INSERT INTO `vn`.`agencyWeekdayBonus`(`id`, `warehouseFk`, `agencyFk`, `weekDay`, `zone`, `bonus`)
|
||||||
|
VALUES
|
||||||
|
( 1, 1, 1, 0, 1, -1.00),
|
||||||
|
( 2, 1, 1, 1, 1, -1.00),
|
||||||
|
( 3, 1, 1, 0, 2, -1.00),
|
||||||
|
( 4, 1, 1, 1, 2, -1.00),
|
||||||
|
( 5, 2, 2, 2, 3, 0);
|
||||||
|
|
||||||
|
INSERT INTO `bi`.`claims_ratio`(`id_Cliente`, `Consumo`, `Reclamaciones`, `Ratio`, `recobro`, `inflacion`)
|
||||||
|
VALUES
|
||||||
|
( 101, 500, NULL, 0.00, 0.00, 1.00),
|
||||||
|
( 102, 1000, 2.00, 0.01, 0.05, 1.00),
|
||||||
|
( 103, 2000, 0.00, 0.00, 0.02, 1.00),
|
||||||
|
( 104, 2500, 150.00, 0.02, 0.10, 1.00);
|
Loading…
Reference in New Issue