chore: remove pre-release schema migrations

This commit is contained in:
blankie 2026-07-03 02:02:46 +00:00
parent 186943c8ab
commit ee83977c38

View file

@ -248,30 +248,6 @@ def init_db():
" added_at TEXT DEFAULT (strftime('%Y-%m-%dT%H:%M:%S','now'))" " added_at TEXT DEFAULT (strftime('%Y-%m-%dT%H:%M:%S','now'))"
")" ")"
) )
# Migrate old subscriptions table if needed
cols = [row[1] for row in db.execute("PRAGMA table_info(subscriptions)").fetchall()]
if "url" in cols and "dest_hash" not in cols:
db.execute("ALTER TABLE subscriptions RENAME COLUMN url TO dest_hash")
db.commit()
# Migrate remote_pages: add tags column if missing
rp_cols = [row[1] for row in db.execute("PRAGMA table_info(remote_pages)").fetchall()]
if "tags" not in rp_cols:
db.execute("ALTER TABLE remote_pages ADD COLUMN tags TEXT DEFAULT ''")
db.commit()
# Migrate pages: add last_modified column if missing
page_cols = [row[1] for row in db.execute("PRAGMA table_info(pages)").fetchall()]
if "last_modified" not in page_cols:
db.execute("ALTER TABLE pages ADD COLUMN last_modified TEXT DEFAULT ''")
db.execute("UPDATE pages SET last_modified = strftime('%Y-%m-%dT%H:%M:%S','now') WHERE last_modified = ''")
db.commit()
# Migrate pages: add summary column if missing
if "summary" not in page_cols:
db.execute("ALTER TABLE pages ADD COLUMN summary TEXT DEFAULT ''")
db.commit()
# Migrate pages: add reticulum_dest column if missing # Migrate pages: add reticulum_dest column if missing
if "reticulum_dest" not in page_cols: if "reticulum_dest" not in page_cols:
db.execute("ALTER TABLE pages ADD COLUMN reticulum_dest TEXT DEFAULT ''") db.execute("ALTER TABLE pages ADD COLUMN reticulum_dest TEXT DEFAULT ''")