fix: sqlite migration drops allowed user groups

This commit is contained in:
Elias Schneider
2025-08-24 23:07:50 +02:00
parent 4b086cebcd
commit d6d1a4ced2
73 changed files with 355 additions and 62 deletions

View File

@@ -1,3 +1,5 @@
PRAGMA foreign_keys=OFF;
BEGIN;
-- Re-create the table with non-nullable ip_address
-- We then move the data and rename the table
CREATE TABLE audit_logs_new
@@ -28,3 +30,6 @@ CREATE INDEX idx_audit_logs_user_id ON audit_logs(user_id);
CREATE INDEX idx_audit_logs_user_agent ON audit_logs(user_agent);
CREATE INDEX idx_audit_logs_client_name ON audit_logs((json_extract(data, '$.clientName')));
CREATE INDEX idx_audit_logs_country ON audit_logs(country);
COMMIT;
PRAGMA foreign_keys=ON;