feat: workspaces system — create, select, rename, delete workspaces
FlowDeck CI / test (push) Failing after 4s
FlowDeck CI / docker (push) Has been skipped

- DB: pages.workspace_id column linking pages to workspaces table
- /workspaces: list, create, rename, delete workspaces page
- API: GET/POST/PUT/DELETE /api/workspaces + POST select
- Session: flowdeck_workspace cookie for active workspace tracking
- Sidebar: Workspace section shows active workspace name + page tree
- Local workspace APIs filter by active workspace_id
- Home redirects non-Gitea users to /workspaces
This commit is contained in:
2026-07-10 16:41:40 -04:00
parent eb417d4ed5
commit 3e6323a856
4 changed files with 279 additions and 4 deletions
+5
View File
@@ -152,6 +152,7 @@ def init_db():
CREATE TABLE IF NOT EXISTS pages (
id INTEGER PRIMARY KEY AUTOINCREMENT,
workspace TEXT NOT NULL,
workspace_id INTEGER REFERENCES workspaces(id),
title TEXT NOT NULL DEFAULT 'New page',
content TEXT NOT NULL DEFAULT '',
parent_section TEXT DEFAULT 'Private',
@@ -322,6 +323,10 @@ def init_db():
conn.execute("ALTER TABLE pages ADD COLUMN published INTEGER DEFAULT 0")
except sqlite3.OperationalError:
pass
try:
conn.execute("ALTER TABLE pages ADD COLUMN workspace_id INTEGER REFERENCES workspaces(id)")
except sqlite3.OperationalError:
pass
# v2.2: Auth locale
for col in ["password_hash", "is_active", "last_login", "login_attempts", "locked_until"]:
try: