Development vs production
- Development
- Production
By default, No migration commands needed. Add fields to your models, restart the backend, and the tables update automatically.
create_tables_on_startup is True. The framework calls SQLModel.metadata.create_all() when the backend starts, creating any missing tables. This is the fastest way to get started:Auto table creation adds new columns but does not drop or rename existing ones. For destructive schema changes, use Alembic even in development.
Run Alembic commands via veloiq db
VeloIQ wraps the most common Alembic commands under veloiq db so you do not need to configure Alembic directly:
Workflow for schema changes
Follow this sequence every time you change a model:1
Change your models
Edit
models.py in the relevant module — add fields, change types, add relations.2
Regenerate the API and frontend schemas
api.py and TypeScript schema files to match the updated models.3
Create a new migration revision
ALTER TABLE (or equivalent) statements.4
Apply the migration
Supported databases
VeloIQ works with any SQLAlchemy-compatible database. Set theDATABASE_URL environment variable (or pass database_url to VeloIQConfig) to the connection string for your database:
- PostgreSQL
- MySQL
- SQLite