Skip to content

Commit

Permalink
🗃️ Add migration
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronleopold committed Dec 26, 2024
1 parent ea32ddc commit 449e442
Showing 1 changed file with 31 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
-- RedefineTables
PRAGMA foreign_keys=OFF;
CREATE TABLE "new_user_preferences" (
"id" TEXT NOT NULL PRIMARY KEY,
"preferred_layout_mode" TEXT NOT NULL DEFAULT 'GRID',
"locale" TEXT NOT NULL DEFAULT 'en',
"app_theme" TEXT NOT NULL DEFAULT 'LIGHT',
"app_font" TEXT NOT NULL DEFAULT 'inter',
"primary_navigation_mode" TEXT NOT NULL DEFAULT 'SIDEBAR',
"layout_max_width_px" INTEGER DEFAULT 1280,
"show_query_indicator" BOOLEAN NOT NULL DEFAULT false,
"enable_live_refetch" BOOLEAN NOT NULL DEFAULT false,
"enable_discord_presence" BOOLEAN NOT NULL DEFAULT false,
"enable_compact_display" BOOLEAN NOT NULL DEFAULT false,
"enable_gradients" BOOLEAN NOT NULL DEFAULT false,
"enable_double_sidebar" BOOLEAN NOT NULL DEFAULT true,
"enable_replace_primary_sidebar" BOOLEAN NOT NULL DEFAULT false,
"enable_hide_scrollbar" BOOLEAN NOT NULL DEFAULT false,
"prefer_accent_color" BOOLEAN NOT NULL DEFAULT true,
"show_thumbnails_in_headers" BOOLEAN NOT NULL DEFAULT false,
"enable_job_overlay" BOOLEAN NOT NULL DEFAULT true,
"navigation_arrangement" BLOB,
"home_arrangement" BLOB,
"user_id" TEXT
);
INSERT INTO "new_user_preferences" ("app_font", "app_theme", "enable_compact_display", "enable_discord_presence", "enable_double_sidebar", "enable_gradients", "enable_hide_scrollbar", "enable_live_refetch", "enable_replace_primary_sidebar", "home_arrangement", "id", "layout_max_width_px", "locale", "navigation_arrangement", "prefer_accent_color", "preferred_layout_mode", "primary_navigation_mode", "show_query_indicator", "show_thumbnails_in_headers", "user_id") SELECT "app_font", "app_theme", "enable_compact_display", "enable_discord_presence", "enable_double_sidebar", "enable_gradients", "enable_hide_scrollbar", "enable_live_refetch", "enable_replace_primary_sidebar", "home_arrangement", "id", "layout_max_width_px", "locale", "navigation_arrangement", "prefer_accent_color", "preferred_layout_mode", "primary_navigation_mode", "show_query_indicator", "show_thumbnails_in_headers", "user_id" FROM "user_preferences";
DROP TABLE "user_preferences";
ALTER TABLE "new_user_preferences" RENAME TO "user_preferences";
CREATE UNIQUE INDEX "user_preferences_user_id_key" ON "user_preferences"("user_id");
PRAGMA foreign_key_check;
PRAGMA foreign_keys=ON;

0 comments on commit 449e442

Please sign in to comment.