Script to import local-db changes, fixtures fixed, structure updated

This commit is contained in:
Juan Ferrer Toribio 2018-02-07 19:55:47 +01:00
parent f84bf44550
commit 45606303fe
5 changed files with 13 additions and 27 deletions

View File

@ -88,7 +88,7 @@ module.exports = function(config) {
customLaunchers: {
FirefoxHeadless: {
base: 'Firefox',
flags: ['--headless']
flags: ['-headless']
}
}
};

View File

@ -5915,7 +5915,7 @@ CREATE TABLE `Tickets_dits` (
CONSTRAINT `Tickets_dits_ibfk_1` FOREIGN KEY (`Id_Ticket`) REFERENCES `Tickets` (`Id_Ticket`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `fgkey1` FOREIGN KEY (`idaccion_dits`) REFERENCES `accion_dits` (`idaccion_dits`) ON DELETE NO ACTION ON UPDATE CASCADE,
CONSTRAINT `fgkey3` FOREIGN KEY (`Id_Trabajador`) REFERENCES `Trabajadores` (`Id_Trabajador`) ON DELETE NO ACTION ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=56922708 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
) ENGINE=InnoDB AUTO_INCREMENT=56922709 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -43997,7 +43997,6 @@ SET character_set_client = utf8;
`id` tinyint NOT NULL,
`clientFk` tinyint NOT NULL,
`workerFk` tinyint NOT NULL,
`__employeeFk` tinyint NOT NULL,
`amount` tinyint NOT NULL,
`created` tinyint NOT NULL
) ENGINE=MyISAM */;
@ -71468,7 +71467,7 @@ USE `vn`;
/*!50001 SET collation_connection = utf8_general_ci */;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */
/*!50001 VIEW `clientCredit` AS select `c`.`id` AS `id`,`c`.`Id_Cliente` AS `clientFk`,`c`.`Id_Trabajador` AS `workerFk`,`c`.`Id_Trabajador` AS `__employeeFk`,`c`.`amount` AS `amount`,`c`.`odbc_date` AS `created` from `vn2008`.`credit` `c` */;
/*!50001 VIEW `clientCredit` AS select `c`.`id` AS `id`,`c`.`Id_Cliente` AS `clientFk`,`c`.`Id_Trabajador` AS `workerFk`,`c`.`amount` AS `amount`,`c`.`odbc_date` AS `created` from `vn2008`.`credit` `c` */;
/*!50001 SET character_set_client = @saved_cs_client */;
/*!50001 SET character_set_results = @saved_cs_results */;
/*!50001 SET collation_connection = @saved_col_connection */;
@ -74749,4 +74748,4 @@ USE `hedera`;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2018-02-07 16:28:24
-- Dump completed on 2018-02-07 18:56:25

View File

@ -1,8 +1,6 @@
#!/bin/bash
myDir=$(dirname $0)
for file in $myDir/changes/*/*.sql; do
for file in changes/*/*.sql; do
echo "Importing $file"
mysql -u root < $file
done

View File

@ -329,6 +329,12 @@ INSERT INTO `vn`.`payMethod`(`id`, `name`, `graceDays`, `outstandingDebt`, `iban
(4, 'PayMethod with IBAN', 0, 001, 1),
(5, 'PayMethod five', 10, 001, 0);
INSERT INTO `vn2008`.`zones`(`zone_id`, `name`, `printingOrder`)
VALUES
(1, 'zone one', 1),
(2, 'zone two', 2),
(3, 'zone three', 3);
INSERT INTO `vn`.`province`(`id`, `name`, `countryFk`, `warehouseFk`, `zoneFk`)
VALUES
(1, 'Province one', 1, NULL, 1),
@ -382,7 +388,7 @@ INSERT INTO `vn`.`client`(`id`,`name`,`fi`,`socialName`,`contact`,`street`,`city
(9, 'Bruce Banner', '16104829E', 'Hulk', 'Black widow', 'Somewhere in New York', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, 'BruceBanner@verdnatura.es', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1,NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1,'0000-00-00', 1, NULL, 1, 1, 1, 1, NULL, 0, 0, 4, 0, 1),
(10, 'Jessica Jones', '58282869H', 'Jessica Jones', 'Luke Cage', 'NYCC 2015 Poster', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, 'JessicaJones@verdnatura.es', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1,NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1,'0000-00-00', 1, NULL, 1, 1, 1, 1, NULL, 0, 0, 4, 0, 1);
INSERT INTO `vn`.`address`(`id`, `nickname`, `street`, `city`, `postalCode`, `provinceFk`, `phone`, `mobile`, `isEnabled`, `isDefaultAddress`, `clientFk`, `agencyFk`, `longitude`, `latitude`, `isEqualizated`)
INSERT INTO `vn`.`address`(`id`, `nickname`, `street`, `city`, `postalCode`, `provinceFk`, `phone`, `mobile`, `isActive`, `isDefaultAddress`, `clientFk`, `agencyFk`, `longitude`, `latitude`, `isEqualizated`)
VALUES
(101, 'Bruce Wayne', 'The Bat cave', 'Silla', 46460, 1, NULL, NULL, 1, 1, 1, 2, NULL, NULL, 0),
(102, 'Petter Parker', 'NY roofs', 'Silla', 46460, 1, NULL, NULL, 1, 1, 2, 2, NULL, NULL, 0),
@ -393,7 +399,7 @@ INSERT INTO `vn`.`address`(`id`, `nickname`, `street`, `city`, `postalCode`, `pr
(107, 'Hank Pym', 'Your pocket', 'Silla', 46460, 1, NULL, NULL, 1, 1, 7, 2, NULL, NULL, 0),
(108, 'Charles Xavier', 'Cerebro', 'Silla', 46460, 1, NULL, NULL, 1, 1, 8, 2, NULL, NULL, 0),
(109, 'Bruce Banner', 'Somewhere in Thailand', 'Silla', 46460, 1, NULL, NULL, 1, 1, 9, 2, NULL, NULL, 0),
(110,'Jessica Jones', 'Luke Cages Bar', 'Silla', 46460, 1, NULL, NULL, 1, 1, 10, 2, NULL, NULL, 0);
(110, 'Jessica Jones', 'Luke Cages Bar', 'Silla', 46460, 1, NULL, NULL, 1, 1, 10, 2, NULL, NULL, 0);
INSERT INTO `vn`.`clientCredit`(`id`, `clientFk`, `workerFk`, `amount`, `created`)
VALUES

View File

@ -1,17 +0,0 @@
CREATE TABLE vn.itemLog
SELECT * FROM vn.entryLog LIMIT 0;
ALTER TABLE `vn`.`itemLog`
ADD INDEX `itemLogItemFk_idx` (`originFk` ASC),
ADD INDEX `itemLogUserFk_idx` (`userFk` ASC);
ALTER TABLE `vn`.`itemLog`
ADD CONSTRAINT `itemLogItemFk`
FOREIGN KEY (`originFk`)
REFERENCES `vn2008`.`Articles` (`Id_Article`)
ON DELETE NO ACTION
ON UPDATE CASCADE,
ADD CONSTRAINT `itemLogUserFk`
FOREIGN KEY (`userFk`)
REFERENCES `account`.`user` (`id`)
ON DELETE NO ACTION
ON UPDATE CASCADE;