refactor: remove Series table and related fields from Novel model
Build and Push Reader API Image / docker (push) Successful in 12s

- Dropped the Series table and removed the seriesId field from the Novel model.
- Updated database migration scripts to reflect these changes.
- Adjusted relevant queries and data handling to ensure consistency without the Series relationship.
This commit is contained in:
2026-05-12 14:37:32 +07:00
parent c985df7579
commit 611213ae5a
3 changed files with 82 additions and 210 deletions
+3 -1
View File
@@ -19,9 +19,11 @@ def main() -> None:
engine = create_engine(_normalize_database_url(database_url))
with engine.begin() as conn:
conn.execute(text('ALTER TABLE "Novel" DROP CONSTRAINT IF EXISTS "Novel_seriesId_fkey"'))
conn.execute(text('ALTER TABLE "Novel" DROP COLUMN IF EXISTS "seriesId"'))
conn.execute(text('DROP TABLE IF EXISTS "Series" CASCADE'))
print("Dropped Series table")
print('Dropped "Series" table and "Novel"."seriesId" column (if present).')
if __name__ == "__main__":