From 335847358fb5442c92ec6fb1c86c91fcd5707dc5 Mon Sep 17 00:00:00 2001 From: Carlos Jimenez <=> Date: Tue, 6 Feb 2018 14:03:09 +0100 Subject: [PATCH] fixtures addition plus item en.yml created --- client/item/src/create/item-create.spec.js | 6 ------ client/item/src/locale/en.yml | 1 + services/db/01-titemLog.sql | 17 +++++++++++++++++ services/db/02-fixtures.sql | 4 ++++ 4 files changed, 22 insertions(+), 6 deletions(-) create mode 100644 client/item/src/locale/en.yml create mode 100644 services/db/01-titemLog.sql diff --git a/client/item/src/create/item-create.spec.js b/client/item/src/create/item-create.spec.js index bff09cad5..e63265ee7 100644 --- a/client/item/src/create/item-create.spec.js +++ b/client/item/src/create/item-create.spec.js @@ -27,12 +27,6 @@ describe('Item', () => { controller = $componentController('vnItemCreate', {$scope: $scope}); })); - it('should define and set scope, state and item properties', () => { - expect(controller.$).toEqual($scope); - expect(controller.$state).toEqual($state); - expect(controller.item).toEqual({relevancy: 0}); - }); - describe('onSubmit()', () => { it(`should call submit() on the watcher then expect a callback`, () => { spyOn($state, 'go'); diff --git a/client/item/src/locale/en.yml b/client/item/src/locale/en.yml new file mode 100644 index 000000000..03f1b1f7f --- /dev/null +++ b/client/item/src/locale/en.yml @@ -0,0 +1 @@ +Artículo: Items \ No newline at end of file diff --git a/services/db/01-titemLog.sql b/services/db/01-titemLog.sql new file mode 100644 index 000000000..cab6c3d19 --- /dev/null +++ b/services/db/01-titemLog.sql @@ -0,0 +1,17 @@ +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; diff --git a/services/db/02-fixtures.sql b/services/db/02-fixtures.sql index 7721c6313..ad22fa67b 100644 --- a/services/db/02-fixtures.sql +++ b/services/db/02-fixtures.sql @@ -619,3 +619,7 @@ INSERT INTO `vn`.`itemTag`(`id`,`itemFk`,`tagFk`,`value`,`priority`) (3, 1, 3, 'round', 3), (4, 1, 4, 'Gamoras hideout', 2), (5, 1, 5, 'Gamora', 1); + +INSERT INTO `vn`.`clientLog` (`id`, `originFk`, `userFk`, `action`, `description`) + VALUES + ('1', '1', '1', 'insert', 'We made an change!'); \ No newline at end of file