Retain datetime precision on downgrade 28/124528/1
authorktimoney <kevin.timoney@est.tech>
Tue, 28 Sep 2021 09:37:39 +0000 (10:37 +0100)
committerktimoney <kevin.timoney@est.tech>
Tue, 28 Sep 2021 10:26:12 +0000 (11:26 +0100)
Retain datetime precision during downgrade operation
to prevent duplicate keys in pdpstatistics

Issue-ID: POLICY-3679
Change-Id: Ic93519b9420f0f77c3af7b63d3963f1971d77c37
Signed-off-by: ktimoney <kevin.timoney@est.tech>
policy-db-migrator/src/main/docker/config/policyadmin/sql/0900/downgrade/0150-pdpstatistics.sql
policy-db-migrator/src/main/docker/config/policyadmin/sql/0900/downgrade/0180-jpapdpstatistics_enginestats.sql

index 4bf55e8..1174fce 100644 (file)
@@ -17,4 +17,4 @@
  *  ============LICENSE_END=========================================================
  */
 
-ALTER TABLE pdpstatistics MODIFY COLUMN timeStamp datetime NOT NULL;
+ALTER TABLE pdpstatistics MODIFY COLUMN timeStamp datetime(6) NOT NULL;
index 64b1ad5..eb8f6a0 100644 (file)
@@ -17,4 +17,4 @@
  *  ============LICENSE_END=========================================================
  */
 
-ALTER TABLE jpapdpstatistics_enginestats ADD COLUMN timeStamp datetime DEFAULT NULL NULL AFTER UPTIME;
+ALTER TABLE jpapdpstatistics_enginestats ADD COLUMN timeStamp datetime(6) DEFAULT NULL NULL AFTER UPTIME;