[update] added migration scripts for migrating news
data to articles
, geographic and category tagging, and default sharing templates
This commit is contained in:
18
backend-rust/migrations/006_update_settings_table.down.sql
Normal file
18
backend-rust/migrations/006_update_settings_table.down.sql
Normal file
@@ -0,0 +1,18 @@
|
||||
-- Remove enhanced settings columns and indexes
|
||||
DROP INDEX IF EXISTS idx_settings_user_id;
|
||||
DROP INDEX IF EXISTS idx_settings_category;
|
||||
|
||||
-- Note: SQLite doesn't support DROP COLUMN, so we recreate the table
|
||||
CREATE TABLE settings_backup AS
|
||||
SELECT key, val
|
||||
FROM settings;
|
||||
DROP TABLE settings;
|
||||
CREATE TABLE settings
|
||||
(
|
||||
key TEXT PRIMARY KEY,
|
||||
val TEXT NOT NULL
|
||||
);
|
||||
INSERT INTO settings
|
||||
SELECT key, val
|
||||
FROM settings_backup;
|
||||
DROP TABLE settings_backup;
|
Reference in New Issue
Block a user