From 58c90b3bbc4bdd0c5b950235d2e00dda6da74e7a Mon Sep 17 00:00:00 2001 From: Pau Navarro Date: Fri, 11 Nov 2022 13:41:22 +0100 Subject: [PATCH 1/9] refs #288 --- .../10503-november/01-Create_stateI18n.sql | 10 +++ .../10503-november/02-insert_stateI18n.sql | 73 +++++++++++++++++++ 2 files changed, 83 insertions(+) create mode 100644 db/changes/10503-november/01-Create_stateI18n.sql create mode 100644 db/changes/10503-november/02-insert_stateI18n.sql diff --git a/db/changes/10503-november/01-Create_stateI18n.sql b/db/changes/10503-november/01-Create_stateI18n.sql new file mode 100644 index 000000000..a4e4fe8e6 --- /dev/null +++ b/db/changes/10503-november/01-Create_stateI18n.sql @@ -0,0 +1,10 @@ +CREATE TABLE `vn`.`stateI18n` ( + `stateFk` tinyint(3) unsigned NOT NULL, + `lang` + set +('en', 'es') NOT NULL, + `name` varchar(255) NOT NULL, + PRIMARY KEY (`stateFk`, `lang`), + KEY `stateFk` (`stateFk`), + CONSTRAINT `stateI18n_state_id` FOREIGN KEY (`stateFk`) REFERENCES `vn`.`state` (`id`) ON UPDATE CASCADE ON DELETE CASCADE +) ENGINE = InnoDB DEFAULT CHARSET = utf8; diff --git a/db/changes/10503-november/02-insert_stateI18n.sql b/db/changes/10503-november/02-insert_stateI18n.sql new file mode 100644 index 000000000..aaaa7171a --- /dev/null +++ b/db/changes/10503-november/02-insert_stateI18n.sql @@ -0,0 +1,73 @@ +INSERT INTO + `vn`.`stateI18n` (`stateFk`, `lang`, `name`) +VALUES + (1, 'en', 'Fix'), + (1, 'es', 'Arreglar'), + (2, 'en', 'Free'), + (2, 'es', 'Libre'), + (3, 'en', 'OK'), + (3, 'es', 'OK'), + (4, 'en', 'Printed'), + (4, 'es', 'Impreso'), + (5, 'en', 'Preparation'), + (5, 'es', 'Preparación'), + (6, 'en', 'In Review'), + (6, 'es', 'En Revisión'), + (7, 'en', 'Unfinished'), + (7, 'es', 'Sin Acabar'), + (8, 'en', 'Reviewed'), + (8, 'es', 'Revisado'), + (9, 'en', 'Fitting'), + (9, 'es', 'Encajando'), + (10, 'en', 'Fitted'), + (10, 'es', 'Encajado'), + (11, 'en', 'Billed'), + (11, 'es', 'Facturado'), + (12, 'en', 'Blocked'), + (12, 'es', 'Bloqueado'), + (13, 'en', 'In Delivery'), + (13, 'es', 'En Reparto'), + (14, 'en', 'Prepared'), + (14, 'es', 'Preparado'), + (15, 'en', 'Pending Collection'), + (15, 'es', 'Pendiente de Recogida'), + (16, 'en', 'Delivered'), + (16, 'es', 'Entregado'), + (20, 'en', 'Assigned'), + (20, 'es', 'Asignado'), + (21, 'en', 'Returned'), + (21, 'es', 'Retornado'), + (22, 'en', 'Pending to extend'), + (22, 'es', 'Pendiente ampliar'), + (23, 'en', 'URGENT'), + (23, 'es', 'URGENTE'), + (24, 'en', 'Chained'), + (24, 'es', 'Encadenado'), + (25, 'en', 'Shipping'), + (25, 'es', 'Embarcando'), + (26, 'en', 'Preparation'), + (26, 'es', 'Preparación previa'), + (27, 'en', 'Assisted preparation'), + (27, 'es', 'Preparación asistida'), + (28, 'en', 'Preparation OK'), + (28, 'es', 'Previa OK'), + (29, 'en', 'Preparation Printed'), + (29, 'es', 'Previa Impreso'), + (30, 'en', 'Shipped'), + (30, 'es', 'Embarcado'), + (31, 'en', 'Stowaway printed'), + (31, 'es', 'Polizón Impreso'), + (32, 'en', 'Stowaway OK'), + (32, 'es', 'Polizón OK'), + (33, 'en', 'Auto_Printed'), + (33, 'es', 'Auto_Impreso'), + (34, 'en', 'Pending payment'), + (34, 'es', 'Pendiente de pago'), + (35, 'en', 'Half-Embedded'), + (35, 'es', 'Semi-Encajado'), + (36, 'en', 'Preparation Reviewing'), + (36, 'es', 'Previa Revisando'), + (37, 'en', 'Preparation Reviewed'), + (37, 'es', 'Previa Revisado'), + (38, 'en', 'Preparation Chamber'), + (38, 'es', 'Preparación Cámara'); \ No newline at end of file From 15f14062ca994d3b9cbe20691e347bdf34d79f33 Mon Sep 17 00:00:00 2001 From: Pau Navarro Date: Thu, 24 Nov 2022 14:06:52 +0100 Subject: [PATCH 2/9] Requested changes --- db/changes/10503-november/01-Create_stateI18n.sql | 6 ++---- db/changes/10503-november/02-insert_stateI18n.sql | 5 ++++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/db/changes/10503-november/01-Create_stateI18n.sql b/db/changes/10503-november/01-Create_stateI18n.sql index a4e4fe8e6..6a9181d4d 100644 --- a/db/changes/10503-november/01-Create_stateI18n.sql +++ b/db/changes/10503-november/01-Create_stateI18n.sql @@ -1,10 +1,8 @@ CREATE TABLE `vn`.`stateI18n` ( `stateFk` tinyint(3) unsigned NOT NULL, - `lang` - set -('en', 'es') NOT NULL, + `lang` char(2) NOT NULL, `name` varchar(255) NOT NULL, PRIMARY KEY (`stateFk`, `lang`), KEY `stateFk` (`stateFk`), - CONSTRAINT `stateI18n_state_id` FOREIGN KEY (`stateFk`) REFERENCES `vn`.`state` (`id`) ON UPDATE CASCADE ON DELETE CASCADE + CONSTRAINT `stateI18n_state_id` FOREIGN KEY (`stateFk`) REFERENCES `vn`.`state` (`id`) ) ENGINE = InnoDB DEFAULT CHARSET = utf8; diff --git a/db/changes/10503-november/02-insert_stateI18n.sql b/db/changes/10503-november/02-insert_stateI18n.sql index aaaa7171a..e303981af 100644 --- a/db/changes/10503-november/02-insert_stateI18n.sql +++ b/db/changes/10503-november/02-insert_stateI18n.sql @@ -1,3 +1,6 @@ +INSERT INTO `vn`.`state` (`name`,`order`,`alertLevel`,`code`,`sectorProdPriority`,`nextStateFk`,`isPreviousPreparable`,`isPicked`,`isPreparable`,`semaphore`,`isPrintable`,`isOK`,`graphCategory`,`isNotValidated`,`classColor`) VALUES + ('Prep Cámara',6,1,'COOLER_PREPARATION',7,14,0,0,0,2,0,0,2,0,'warning'); + INSERT INTO `vn`.`stateI18n` (`stateFk`, `lang`, `name`) VALUES @@ -5,7 +8,7 @@ VALUES (1, 'es', 'Arreglar'), (2, 'en', 'Free'), (2, 'es', 'Libre'), - (3, 'en', 'OK'), + (3, 'en', 'OK'), (3, 'es', 'OK'), (4, 'en', 'Printed'), (4, 'es', 'Impreso'), From 724c1e6e8ac54eabeba56da2056ccfaa450f4ddb Mon Sep 17 00:00:00 2001 From: Pau Navarro Date: Fri, 25 Nov 2022 07:08:54 +0100 Subject: [PATCH 3/9] remove unnecessary index --- db/changes/10503-november/01-Create_stateI18n.sql | 1 - 1 file changed, 1 deletion(-) diff --git a/db/changes/10503-november/01-Create_stateI18n.sql b/db/changes/10503-november/01-Create_stateI18n.sql index 6a9181d4d..28f6d7431 100644 --- a/db/changes/10503-november/01-Create_stateI18n.sql +++ b/db/changes/10503-november/01-Create_stateI18n.sql @@ -2,7 +2,6 @@ CREATE TABLE `vn`.`stateI18n` ( `stateFk` tinyint(3) unsigned NOT NULL, `lang` char(2) NOT NULL, `name` varchar(255) NOT NULL, - PRIMARY KEY (`stateFk`, `lang`), KEY `stateFk` (`stateFk`), CONSTRAINT `stateI18n_state_id` FOREIGN KEY (`stateFk`) REFERENCES `vn`.`state` (`id`) ) ENGINE = InnoDB DEFAULT CHARSET = utf8; From d356e5352b71fc0a56af2d4cd4d94e247fca7b47 Mon Sep 17 00:00:00 2001 From: Pau Navarro Date: Mon, 19 Dec 2022 07:41:15 +0100 Subject: [PATCH 4/9] delete old files --- .../10503-november/01-Create_stateI18n.sql | 7 -- .../10503-november/02-insert_stateI18n.sql | 76 ------------------- 2 files changed, 83 deletions(-) delete mode 100644 db/changes/10503-november/01-Create_stateI18n.sql delete mode 100644 db/changes/10503-november/02-insert_stateI18n.sql diff --git a/db/changes/10503-november/01-Create_stateI18n.sql b/db/changes/10503-november/01-Create_stateI18n.sql deleted file mode 100644 index 28f6d7431..000000000 --- a/db/changes/10503-november/01-Create_stateI18n.sql +++ /dev/null @@ -1,7 +0,0 @@ -CREATE TABLE `vn`.`stateI18n` ( - `stateFk` tinyint(3) unsigned NOT NULL, - `lang` char(2) NOT NULL, - `name` varchar(255) NOT NULL, - KEY `stateFk` (`stateFk`), - CONSTRAINT `stateI18n_state_id` FOREIGN KEY (`stateFk`) REFERENCES `vn`.`state` (`id`) -) ENGINE = InnoDB DEFAULT CHARSET = utf8; diff --git a/db/changes/10503-november/02-insert_stateI18n.sql b/db/changes/10503-november/02-insert_stateI18n.sql deleted file mode 100644 index e303981af..000000000 --- a/db/changes/10503-november/02-insert_stateI18n.sql +++ /dev/null @@ -1,76 +0,0 @@ -INSERT INTO `vn`.`state` (`name`,`order`,`alertLevel`,`code`,`sectorProdPriority`,`nextStateFk`,`isPreviousPreparable`,`isPicked`,`isPreparable`,`semaphore`,`isPrintable`,`isOK`,`graphCategory`,`isNotValidated`,`classColor`) VALUES - ('Prep Cámara',6,1,'COOLER_PREPARATION',7,14,0,0,0,2,0,0,2,0,'warning'); - -INSERT INTO - `vn`.`stateI18n` (`stateFk`, `lang`, `name`) -VALUES - (1, 'en', 'Fix'), - (1, 'es', 'Arreglar'), - (2, 'en', 'Free'), - (2, 'es', 'Libre'), - (3, 'en', 'OK'), - (3, 'es', 'OK'), - (4, 'en', 'Printed'), - (4, 'es', 'Impreso'), - (5, 'en', 'Preparation'), - (5, 'es', 'Preparación'), - (6, 'en', 'In Review'), - (6, 'es', 'En Revisión'), - (7, 'en', 'Unfinished'), - (7, 'es', 'Sin Acabar'), - (8, 'en', 'Reviewed'), - (8, 'es', 'Revisado'), - (9, 'en', 'Fitting'), - (9, 'es', 'Encajando'), - (10, 'en', 'Fitted'), - (10, 'es', 'Encajado'), - (11, 'en', 'Billed'), - (11, 'es', 'Facturado'), - (12, 'en', 'Blocked'), - (12, 'es', 'Bloqueado'), - (13, 'en', 'In Delivery'), - (13, 'es', 'En Reparto'), - (14, 'en', 'Prepared'), - (14, 'es', 'Preparado'), - (15, 'en', 'Pending Collection'), - (15, 'es', 'Pendiente de Recogida'), - (16, 'en', 'Delivered'), - (16, 'es', 'Entregado'), - (20, 'en', 'Assigned'), - (20, 'es', 'Asignado'), - (21, 'en', 'Returned'), - (21, 'es', 'Retornado'), - (22, 'en', 'Pending to extend'), - (22, 'es', 'Pendiente ampliar'), - (23, 'en', 'URGENT'), - (23, 'es', 'URGENTE'), - (24, 'en', 'Chained'), - (24, 'es', 'Encadenado'), - (25, 'en', 'Shipping'), - (25, 'es', 'Embarcando'), - (26, 'en', 'Preparation'), - (26, 'es', 'Preparación previa'), - (27, 'en', 'Assisted preparation'), - (27, 'es', 'Preparación asistida'), - (28, 'en', 'Preparation OK'), - (28, 'es', 'Previa OK'), - (29, 'en', 'Preparation Printed'), - (29, 'es', 'Previa Impreso'), - (30, 'en', 'Shipped'), - (30, 'es', 'Embarcado'), - (31, 'en', 'Stowaway printed'), - (31, 'es', 'Polizón Impreso'), - (32, 'en', 'Stowaway OK'), - (32, 'es', 'Polizón OK'), - (33, 'en', 'Auto_Printed'), - (33, 'es', 'Auto_Impreso'), - (34, 'en', 'Pending payment'), - (34, 'es', 'Pendiente de pago'), - (35, 'en', 'Half-Embedded'), - (35, 'es', 'Semi-Encajado'), - (36, 'en', 'Preparation Reviewing'), - (36, 'es', 'Previa Revisando'), - (37, 'en', 'Preparation Reviewed'), - (37, 'es', 'Previa Revisado'), - (38, 'en', 'Preparation Chamber'), - (38, 'es', 'Preparación Cámara'); \ No newline at end of file From f57201c8c308e71be77ccb8c3c5bf5887c881396 Mon Sep 17 00:00:00 2001 From: Pau Navarro Date: Thu, 22 Dec 2022 08:20:59 +0100 Subject: [PATCH 5/9] add requested changes --- db/changes/225001/01-create_stateI18n.sql | 2 +- db/changes/225001/02-insert_stateI18n.sql | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/db/changes/225001/01-create_stateI18n.sql b/db/changes/225001/01-create_stateI18n.sql index 28f6d7431..799360b1e 100644 --- a/db/changes/225001/01-create_stateI18n.sql +++ b/db/changes/225001/01-create_stateI18n.sql @@ -2,6 +2,6 @@ CREATE TABLE `vn`.`stateI18n` ( `stateFk` tinyint(3) unsigned NOT NULL, `lang` char(2) NOT NULL, `name` varchar(255) NOT NULL, - KEY `stateFk` (`stateFk`), + PRIMARY KEY (`stateFk`, `lang`), CONSTRAINT `stateI18n_state_id` FOREIGN KEY (`stateFk`) REFERENCES `vn`.`state` (`id`) ) ENGINE = InnoDB DEFAULT CHARSET = utf8; diff --git a/db/changes/225001/02-insert_stateI18n.sql b/db/changes/225001/02-insert_stateI18n.sql index e303981af..7df36d662 100644 --- a/db/changes/225001/02-insert_stateI18n.sql +++ b/db/changes/225001/02-insert_stateI18n.sql @@ -1,6 +1,3 @@ -INSERT INTO `vn`.`state` (`name`,`order`,`alertLevel`,`code`,`sectorProdPriority`,`nextStateFk`,`isPreviousPreparable`,`isPicked`,`isPreparable`,`semaphore`,`isPrintable`,`isOK`,`graphCategory`,`isNotValidated`,`classColor`) VALUES - ('Prep Cámara',6,1,'COOLER_PREPARATION',7,14,0,0,0,2,0,0,2,0,'warning'); - INSERT INTO `vn`.`stateI18n` (`stateFk`, `lang`, `name`) VALUES From c0d285856b069b75624af760e44c2d1db8b7e8d1 Mon Sep 17 00:00:00 2001 From: Pau Navarro Date: Thu, 22 Dec 2022 08:24:54 +0100 Subject: [PATCH 6/9] move sql files --- db/changes/{225001 => 225201}/01-create_stateI18n.sql | 0 db/changes/{225001 => 225201}/02-insert_stateI18n.sql | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename db/changes/{225001 => 225201}/01-create_stateI18n.sql (100%) rename db/changes/{225001 => 225201}/02-insert_stateI18n.sql (100%) diff --git a/db/changes/225001/01-create_stateI18n.sql b/db/changes/225201/01-create_stateI18n.sql similarity index 100% rename from db/changes/225001/01-create_stateI18n.sql rename to db/changes/225201/01-create_stateI18n.sql diff --git a/db/changes/225001/02-insert_stateI18n.sql b/db/changes/225201/02-insert_stateI18n.sql similarity index 100% rename from db/changes/225001/02-insert_stateI18n.sql rename to db/changes/225201/02-insert_stateI18n.sql From ff0243db8f01df1200f1f77c42724446d896b428 Mon Sep 17 00:00:00 2001 From: joan Date: Fri, 23 Dec 2022 09:55:15 +0100 Subject: [PATCH 7/9] Fixed SQL files --- db/changes/{10510-december => 225201}/00-mdbApp.sql | 0 db/changes/225201/00-utilNotification.sql | 2 +- db/dump/dumpedFixtures.sql | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename db/changes/{10510-december => 225201}/00-mdbApp.sql (100%) diff --git a/db/changes/10510-december/00-mdbApp.sql b/db/changes/225201/00-mdbApp.sql similarity index 100% rename from db/changes/10510-december/00-mdbApp.sql rename to db/changes/225201/00-mdbApp.sql diff --git a/db/changes/225201/00-utilNotification.sql b/db/changes/225201/00-utilNotification.sql index 5c80b81b3..74f0de5e2 100644 --- a/db/changes/225201/00-utilNotification.sql +++ b/db/changes/225201/00-utilNotification.sql @@ -1,4 +1,4 @@ INSERT INTO `util`.`notification` (id, name, description) VALUES(3, 'book-entries-imported-incorrectly', 'accounting entries exported incorrectly'); INSERT INTO `util`.`notificationAcl` (notificationFk, roleFk) VALUES(3, 5); -INSERT INTO `util`.`notificationSubscription` (notificationFk, userFk) VALUES(3, 19663); +INSERT IGNORE INTO `util`.`notificationSubscription` (notificationFk, userFk) VALUES(3, 19663); diff --git a/db/dump/dumpedFixtures.sql b/db/dump/dumpedFixtures.sql index 77dd8c1f7..e517fc30d 100644 --- a/db/dump/dumpedFixtures.sql +++ b/db/dump/dumpedFixtures.sql @@ -22,7 +22,7 @@ USE `util`; LOCK TABLES `config` WRITE; /*!40000 ALTER TABLE `config` DISABLE KEYS */; -INSERT INTO `config` VALUES (1,'224602',0,'production',NULL); +INSERT INTO `config` VALUES (1,'224903',0,'production',NULL); /*!40000 ALTER TABLE `config` ENABLE KEYS */; UNLOCK TABLES; From 39699114e320491cc48de1fcd4f4a39c66637bc9 Mon Sep 17 00:00:00 2001 From: joan Date: Fri, 23 Dec 2022 10:01:08 +0100 Subject: [PATCH 8/9] Changed version --- db/dump/dumpedFixtures.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/dump/dumpedFixtures.sql b/db/dump/dumpedFixtures.sql index e517fc30d..77dd8c1f7 100644 --- a/db/dump/dumpedFixtures.sql +++ b/db/dump/dumpedFixtures.sql @@ -22,7 +22,7 @@ USE `util`; LOCK TABLES `config` WRITE; /*!40000 ALTER TABLE `config` DISABLE KEYS */; -INSERT INTO `config` VALUES (1,'224903',0,'production',NULL); +INSERT INTO `config` VALUES (1,'224602',0,'production',NULL); /*!40000 ALTER TABLE `config` ENABLE KEYS */; UNLOCK TABLES; From c13b49c7cdfa6a3607dce0037a734fd686c1a717 Mon Sep 17 00:00:00 2001 From: joan Date: Fri, 23 Dec 2022 10:07:19 +0100 Subject: [PATCH 9/9] Added next version & changelog --- CHANGELOG.md | 16 ++++++++++++++++ db/changes/230201/.gitkeep | 0 2 files changed, 16 insertions(+) create mode 100644 CHANGELOG.md create mode 100644 db/changes/230201/.gitkeep diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000..95b3028de --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,16 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [2302.01] - 2023-01-12 + +### Added + +- + +### Changed + +- \ No newline at end of file diff --git a/db/changes/230201/.gitkeep b/db/changes/230201/.gitkeep new file mode 100644 index 000000000..e69de29bb