From 783dcdbe0536d5563894706eaa272476a4b54d8b Mon Sep 17 00:00:00 2001 From: tkuzynow Date: Fri, 28 Oct 2022 11:43:00 +0200 Subject: [PATCH 1/3] fix: fix mysql incopmpatibilities --- .../db/changelog/changeset/0001_initsql/initTables.sql | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/resources/db/changelog/changeset/0001_initsql/initTables.sql b/src/main/resources/db/changelog/changeset/0001_initsql/initTables.sql index 555607d3..37994081 100644 --- a/src/main/resources/db/changelog/changeset/0001_initsql/initTables.sql +++ b/src/main/resources/db/changelog/changeset/0001_initsql/initTables.sql @@ -21,8 +21,8 @@ CREATE TABLE `agencyservice`.`agency` ( `city` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, `is_team_agency` tinyint(4) NOT NULL DEFAULT '0', `id_old` bigint(21) NOT NULL, - `create_date` datetime NOT NULL DEFAULT UTC_TIMESTAMP(), - `update_date` datetime NOT NULL DEFAULT UTC_TIMESTAMP(), + `create_date` datetime NOT NULL DEFAULT UTC_TIMESTAMP, + `update_date` datetime NOT NULL DEFAULT UTC_TIMESTAMP, PRIMARY KEY (`id`), KEY `diocese_id` (`diocese_id`), CONSTRAINT `agency_ibfk_1` FOREIGN KEY (`diocese_id`) REFERENCES `diocese` (`id`) ON UPDATE CASCADE @@ -38,8 +38,8 @@ CREATE TABLE `agencyservice`.`agency_postcode_range` ( `agency_id` bigint(21) NOT NULL, `postcode_from` varchar(5) COLLATE utf8_unicode_ci NOT NULL, `postcode_to` varchar(5) COLLATE utf8_unicode_ci NOT NULL, - `create_date` datetime NOT NULL DEFAULT UTC_TIMESTAMP(), - `update_date` datetime NOT NULL DEFAULT UTC_TIMESTAMP(), + `create_date` datetime NOT NULL DEFAULT UTC_TIMESTAMP, + `update_date` datetime NOT NULL DEFAULT UTC_TIMESTAMP, PRIMARY KEY (`id`), KEY `agency_id` (`agency_id`), CONSTRAINT `agency_postcode_range_ibfk_1` FOREIGN KEY (`agency_id`) REFERENCES `agency` (`id`) ON UPDATE CASCADE From 1af0663e4cbf17ef9b7de744b70f56abb4bb157a Mon Sep 17 00:00:00 2001 From: tkuzynow Date: Fri, 28 Oct 2022 11:43:35 +0200 Subject: [PATCH 2/3] fix: fix mysql incopmpatibilities --- .../db/changelog/changeset/0001_initsql/initTables.sql | 4 ++-- .../db/changelog/changeset/0009_agency_topic/agencyTopic.sql | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/resources/db/changelog/changeset/0001_initsql/initTables.sql b/src/main/resources/db/changelog/changeset/0001_initsql/initTables.sql index 37994081..dea8b183 100644 --- a/src/main/resources/db/changelog/changeset/0001_initsql/initTables.sql +++ b/src/main/resources/db/changelog/changeset/0001_initsql/initTables.sql @@ -2,8 +2,8 @@ CREATE TABLE `agencyservice`.`diocese` ( `id` bigint(21) NOT NULL, `name` varchar(100) COLLATE utf8_unicode_ci NOT NULL, `id_old` bigint(21) NOT NULL, - `create_date` datetime NOT NULL DEFAULT UTC_TIMESTAMP(), - `update_date` datetime NOT NULL DEFAULT UTC_TIMESTAMP(), + `create_date` datetime NOT NULL DEFAULT UTC_TIMESTAMP, + `update_date` datetime NOT NULL DEFAULT UTC_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; CREATE SEQUENCE agencyservice.sequence_diocese diff --git a/src/main/resources/db/changelog/changeset/0009_agency_topic/agencyTopic.sql b/src/main/resources/db/changelog/changeset/0009_agency_topic/agencyTopic.sql index 20e41ba7..85800fe2 100644 --- a/src/main/resources/db/changelog/changeset/0009_agency_topic/agencyTopic.sql +++ b/src/main/resources/db/changelog/changeset/0009_agency_topic/agencyTopic.sql @@ -2,8 +2,8 @@ CREATE TABLE `agencyservice`.`agency_topic` ( `id` bigint(21) NOT NULL, `agency_id` bigint(21) NOT NULL, `topic_id` bigint(21) NOT NULL, - `create_date` datetime NOT NULL DEFAULT UTC_TIMESTAMP(), - `update_date` datetime NOT NULL DEFAULT UTC_TIMESTAMP(), + `create_date` datetime NOT NULL DEFAULT UTC_TIMESTAMP, + `update_date` datetime NOT NULL DEFAULT UTC_TIMESTAMP, PRIMARY KEY (`id`), KEY `agency_id` (`agency_id`), CONSTRAINT `agency_topic_ibfk_1` FOREIGN KEY (`agency_id`) REFERENCES `agency` (`id`) ON UPDATE CASCADE From cc4b8b98bf69911156a9ff0760e3b0d8ee4561c1 Mon Sep 17 00:00:00 2001 From: tkuzynow Date: Fri, 28 Oct 2022 12:25:06 +0200 Subject: [PATCH 3/3] fix: fix mysql incompatibilities --- .../changelog/changeset/0001_initsql/initTables.sql | 12 ++++++------ .../changeset/0009_agency_topic/agencyTopic.sql | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/resources/db/changelog/changeset/0001_initsql/initTables.sql b/src/main/resources/db/changelog/changeset/0001_initsql/initTables.sql index dea8b183..14368d43 100644 --- a/src/main/resources/db/changelog/changeset/0001_initsql/initTables.sql +++ b/src/main/resources/db/changelog/changeset/0001_initsql/initTables.sql @@ -2,8 +2,8 @@ CREATE TABLE `agencyservice`.`diocese` ( `id` bigint(21) NOT NULL, `name` varchar(100) COLLATE utf8_unicode_ci NOT NULL, `id_old` bigint(21) NOT NULL, - `create_date` datetime NOT NULL DEFAULT UTC_TIMESTAMP, - `update_date` datetime NOT NULL DEFAULT UTC_TIMESTAMP, + `create_date` datetime NOT NULL DEFAULT (UTC_TIMESTAMP), + `update_date` datetime NOT NULL DEFAULT (UTC_TIMESTAMP), PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; CREATE SEQUENCE agencyservice.sequence_diocese @@ -21,8 +21,8 @@ CREATE TABLE `agencyservice`.`agency` ( `city` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, `is_team_agency` tinyint(4) NOT NULL DEFAULT '0', `id_old` bigint(21) NOT NULL, - `create_date` datetime NOT NULL DEFAULT UTC_TIMESTAMP, - `update_date` datetime NOT NULL DEFAULT UTC_TIMESTAMP, + `create_date` datetime NOT NULL DEFAULT (UTC_TIMESTAMP), + `update_date` datetime NOT NULL DEFAULT (UTC_TIMESTAMP), PRIMARY KEY (`id`), KEY `diocese_id` (`diocese_id`), CONSTRAINT `agency_ibfk_1` FOREIGN KEY (`diocese_id`) REFERENCES `diocese` (`id`) ON UPDATE CASCADE @@ -38,8 +38,8 @@ CREATE TABLE `agencyservice`.`agency_postcode_range` ( `agency_id` bigint(21) NOT NULL, `postcode_from` varchar(5) COLLATE utf8_unicode_ci NOT NULL, `postcode_to` varchar(5) COLLATE utf8_unicode_ci NOT NULL, - `create_date` datetime NOT NULL DEFAULT UTC_TIMESTAMP, - `update_date` datetime NOT NULL DEFAULT UTC_TIMESTAMP, + `create_date` datetime NOT NULL DEFAULT (UTC_TIMESTAMP), + `update_date` datetime NOT NULL DEFAULT (UTC_TIMESTAMP), PRIMARY KEY (`id`), KEY `agency_id` (`agency_id`), CONSTRAINT `agency_postcode_range_ibfk_1` FOREIGN KEY (`agency_id`) REFERENCES `agency` (`id`) ON UPDATE CASCADE diff --git a/src/main/resources/db/changelog/changeset/0009_agency_topic/agencyTopic.sql b/src/main/resources/db/changelog/changeset/0009_agency_topic/agencyTopic.sql index 85800fe2..07f1d9e3 100644 --- a/src/main/resources/db/changelog/changeset/0009_agency_topic/agencyTopic.sql +++ b/src/main/resources/db/changelog/changeset/0009_agency_topic/agencyTopic.sql @@ -2,8 +2,8 @@ CREATE TABLE `agencyservice`.`agency_topic` ( `id` bigint(21) NOT NULL, `agency_id` bigint(21) NOT NULL, `topic_id` bigint(21) NOT NULL, - `create_date` datetime NOT NULL DEFAULT UTC_TIMESTAMP, - `update_date` datetime NOT NULL DEFAULT UTC_TIMESTAMP, + `create_date` datetime NOT NULL DEFAULT (UTC_TIMESTAMP), + `update_date` datetime NOT NULL DEFAULT (UTC_TIMESTAMP), PRIMARY KEY (`id`), KEY `agency_id` (`agency_id`), CONSTRAINT `agency_topic_ibfk_1` FOREIGN KEY (`agency_id`) REFERENCES `agency` (`id`) ON UPDATE CASCADE