Files
rssWorkFlow/scripts/migrate_from_sqlite.py
T
congsh ba6e7669e8 Initial commit: RSS platform phase 1 skeleton with code review fixes
Features:
- FastAPI + SQLAlchemy 2.0 async + PostgreSQL/pgvector + Redis backend
- Vue 3 + TypeScript + Element Plus frontend
- JWT auth with access/refresh tokens and revocation
- Admin/member RBAC
- RSS feed CRUD and article listing
- Settings management with Fernet encryption for sensitive values
- Redis distributed lock service
- Alembic initial migration
- Docker Compose development environment

Fixes from code review:
- Fix DB session leak in dependency injection
- Restrict registration to admin only
- Add default admin password warning
- Implement JWT refresh tokens and jti blacklist
- Strengthen password policy
- Use func.count for pagination totals
- Replace NullPool with AsyncAdaptedQueuePool
- Remove init_db from lifespan to enforce alembic migrations
- Add request_id middleware and logging filter
- Fix vite.config.ts env loading
- Add frontend token refresh interceptor
- Add Vue error handler

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 17:01:57 +08:00

20 lines
831 B
Python

"""Placeholder for SQLite to PostgreSQL migration script."""
import argparse
def main():
parser = argparse.ArgumentParser(description="Migrate SQLite data to PostgreSQL")
parser.add_argument("--rsskeeper-db", required=True, help="Path to rssKeeper SQLite database")
parser.add_argument("--dataclean-db", required=True, help="Path to dataClean SQLite database")
parser.add_argument("--pg-url", required=True, help="PostgreSQL connection URL")
parser.add_argument("--dry-run", action="store_true", help="Dry run without writing")
args = parser.parse_args()
print(f"Migrating from {args.rsskeeper_db} and {args.dataclean_db} to {args.pg_url}")
print("This is a placeholder. Full implementation will be added in a later phase.")
return 0
if __name__ == "__main__":
raise SystemExit(main())