feat(gui): replace AI studio with product suite
This commit is contained in:
@@ -299,6 +299,7 @@ CREATE TABLE IF NOT EXISTS image_studio_projects (
|
||||
target_main_count INTEGER NOT NULL DEFAULT 9,
|
||||
target_detail_count INTEGER NOT NULL DEFAULT 12,
|
||||
draft_prompt TEXT,
|
||||
suite_settings_json TEXT NOT NULL DEFAULT '{}',
|
||||
status TEXT NOT NULL DEFAULT 'active',
|
||||
created_at TEXT NOT NULL,
|
||||
updated_at TEXT NOT NULL,
|
||||
@@ -478,6 +479,7 @@ def init_db(path=None, conn=None) -> None:
|
||||
_ensure_batch_delete_columns(database)
|
||||
_ensure_task_image_task_columns(database)
|
||||
_ensure_task_cover_reset_columns(database)
|
||||
_ensure_image_studio_project_suite_columns(database)
|
||||
_ensure_image_studio_job_recovery_columns(database)
|
||||
|
||||
|
||||
@@ -505,6 +507,18 @@ def _ensure_task_cover_reset_columns(database):
|
||||
database.execute("ALTER TABLE tasks ADD COLUMN cover_reset_at TEXT")
|
||||
|
||||
|
||||
def _ensure_image_studio_project_suite_columns(database):
|
||||
columns = {
|
||||
row["name"]
|
||||
for row in database.execute("PRAGMA table_info(image_studio_projects)").fetchall()
|
||||
}
|
||||
if "suite_settings_json" not in columns:
|
||||
database.execute(
|
||||
"ALTER TABLE image_studio_projects "
|
||||
"ADD COLUMN suite_settings_json TEXT NOT NULL DEFAULT '{}'"
|
||||
)
|
||||
|
||||
|
||||
def _ensure_image_studio_job_recovery_columns(database):
|
||||
columns = {
|
||||
row["name"] for row in database.execute("PRAGMA table_info(image_studio_jobs)").fetchall()
|
||||
|
||||
Reference in New Issue
Block a user