Commit graph

5 commits

Author SHA1 Message Date
sudipnext
653e35bb3d refactor: reorganize migration functions and enhance legacy database handling
- Moved the legacy database URL conversion function to improve clarity.
- Introduced a new function to handle legacy database stamping before migrations.
- Updated error handling during migration to ensure legacy databases are properly managed.
- Cleaned up redundant code and improved comments for better maintainability.
2026-03-26 16:29:52 +05:45
sudipnext
f050064771 feat: add legacy database migration support and new database schema
- Introduced functions to handle legacy database stamping and migration.
- Added a new Alembic migration script for initializing the database schema.
- Enhanced the migration process to check for unversioned databases and apply necessary stamps before upgrades.
- Created new migration files for adding a theme column to presentations.
2026-03-26 15:33:49 +05:45
sudipnext
024f174867 feat: add migration for theme column in presentations and enhance database migration handling
- Introduced a new Alembic migration to add a 'theme' column to the 'presentations' table.
- Updated migration scripts to handle unversioned databases more gracefully.
- Added a script for programmatically deleting local SQLite database files and running migrations.
- Enhanced database initialization logic to conditionally run migrations based on environment settings.
2026-03-25 20:09:35 +05:45
sudipnext
c8faab97d9 Refactor database URL handling and ensure SQLite parent directory creation
- Introduced a helper function `_to_sync_database_url` to standardize the conversion of async database URLs to sync URLs in `env.py` and `migrations.py`.
- Added `_ensure_sqlite_parent_dir` function in `db_utils.py` to create the parent directory for SQLite databases if it doesn't exist, ensuring compatibility with Windows paths.
- Updated the `get_database_url_and_connect_args` function to call `_ensure_sqlite_parent_dir` before processing the database URL.
- Simplified the `sync_export_runtime.js` script by removing the build step and directly using committed runtime artifacts, ensuring a smoother export process.
2026-03-16 07:47:43 +05:45
sudipnext
2d462d8df4 feat: implement database migration on startup and update dependencies for FastAPI 2026-03-08 20:05:44 +05:45