diff --git a/karma.conf.js b/karma.conf.js index 216d51392..0518f8cd0 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -88,7 +88,7 @@ module.exports = function(config) { customLaunchers: { FirefoxHeadless: { base: 'Firefox', - flags: ['--headless'] + flags: ['-headless'] } } }; diff --git a/services/db/01-structure.sql b/services/db/01-structure.sql index a7aed8294..b700a6cf0 100644 --- a/services/db/01-structure.sql +++ b/services/db/01-structure.sql @@ -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 diff --git a/services/db/02-changes.sh b/services/db/02-changes.sh index 14253fe2f..4e0d23d3a 100755 --- a/services/db/02-changes.sh +++ b/services/db/02-changes.sh @@ -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 diff --git a/services/db/03-fixtures.sql b/services/db/03-fixtures.sql index 813558575..ba710230d 100644 --- a/services/db/03-fixtures.sql +++ b/services/db/03-fixtures.sql @@ -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 diff --git a/services/db/changes/1.0.0/04-itemLog.sql b/services/db/changes/1.0.0/04-itemLog.sql deleted file mode 100644 index cab6c3d19..000000000 --- a/services/db/changes/1.0.0/04-itemLog.sql +++ /dev/null @@ -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;