Drop qt_users dependency for configs and track app version
This commit is contained in:
@@ -14,6 +14,7 @@ CREATE TABLE local_configuration_versions (
|
||||
data TEXT NOT NULL,
|
||||
change_note TEXT NULL,
|
||||
created_by TEXT NULL,
|
||||
app_version TEXT NULL,
|
||||
created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
FOREIGN KEY (configuration_uuid) REFERENCES local_configurations(uuid),
|
||||
UNIQUE(configuration_uuid, version_no)
|
||||
@@ -36,6 +37,7 @@ INSERT INTO local_configuration_versions (
|
||||
data,
|
||||
change_note,
|
||||
created_by,
|
||||
app_version,
|
||||
created_at
|
||||
)
|
||||
SELECT
|
||||
@@ -58,10 +60,12 @@ SELECT
|
||||
'synced_at', synced_at,
|
||||
'sync_status', sync_status,
|
||||
'original_user_id', original_user_id,
|
||||
'original_username', original_username
|
||||
'original_username', original_username,
|
||||
'app_version', NULL
|
||||
) AS data,
|
||||
'Initial snapshot backfill (v1)' AS change_note,
|
||||
NULL AS created_by,
|
||||
NULL AS app_version,
|
||||
COALESCE(created_at, CURRENT_TIMESTAMP) AS created_at
|
||||
FROM local_configurations;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user