Move last opened file to workspaces table

This commit is contained in:
2024-10-30 21:37:07 +01:00
parent 1086c402ec
commit bef682e5cb
6 changed files with 57 additions and 53 deletions

View File

@@ -22,8 +22,7 @@ var migrations = []Migration{
password_hash TEXT NOT NULL,
role TEXT NOT NULL CHECK(role IN ('admin', 'editor', 'viewer')),
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
last_workspace_id INTEGER,
last_opened_file_path TEXT
last_workspace_id INTEGER
);
-- Create workspaces table with integrated settings
@@ -32,6 +31,7 @@ var migrations = []Migration{
user_id INTEGER NOT NULL,
name TEXT NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
last_opened_file_path TEXT,
-- Settings fields
theme TEXT NOT NULL DEFAULT 'light' CHECK(theme IN ('light', 'dark')),
auto_save BOOLEAN NOT NULL DEFAULT 0,