From e4a8931d72e840dfb12e50399a1a35619d47f526 Mon Sep 17 00:00:00 2001 From: Timm Fitschen <t.fitschen@indiscale.com> Date: Wed, 17 Jun 2020 01:56:22 +0200 Subject: [PATCH] WIP: versioning --- patches/patch20200426-3.0.0/fix_unversioned.sql | 6 +++--- patches/patch20200426-3.0.0/patch.sh | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/patches/patch20200426-3.0.0/fix_unversioned.sql b/patches/patch20200426-3.0.0/fix_unversioned.sql index a44cfea..069409d 100644 --- a/patches/patch20200426-3.0.0/fix_unversioned.sql +++ b/patches/patch20200426-3.0.0/fix_unversioned.sql @@ -80,20 +80,20 @@ BEGIN AND t.nanos = l.nanos AND t.username = l.username AND t.realm = l.realm ) - WHERE l.entity_id = unversioned_id; + WHERE l.entity_id = unversioned_id AND unversioned_id > 99; -- insert single version into entity_version (for id<100) INSERT IGNORE INTO entity_version (entity_id, hash, version, _iversion, _ipparent, srid) SELECT unversioned_id AS entity_id, - "bla" AS hash, + NULL AS hash, SHA1(UUID()) AS version, 1 AS _iversion, NULL AS _ipparent, t.srid AS srid FROM transactions AS t - WHERE t.seconds = 0 AND t.nanos = 0; + WHERE t.seconds = 0 AND t.nanos = 0 AND unversioned_id<100; END LOOP; diff --git a/patches/patch20200426-3.0.0/patch.sh b/patches/patch20200426-3.0.0/patch.sh index 0799c7c..f05118b 100755 --- a/patches/patch20200426-3.0.0/patch.sh +++ b/patches/patch20200426-3.0.0/patch.sh @@ -36,11 +36,8 @@ fi check_version $OLD_VERSION -echo "feature_config.sql" mysql_execute_file $PATCH_DIR/feature_config.sql -echo "versioning.sql" mysql_execute_file $PATCH_DIR/versioning.sql -echo "fix_unversioned.sql" mysql_execute_file $PATCH_DIR/fix_unversioned.sql -- GitLab