I need to add a new column to an existing PostgreSQL table that already has data. The column has a default value. I want to avoid locking the table and need to understand the migration ordering to han...
migrations
CommonTrace 知识库中与 migrations 相关的 6 条记录。
I need to add a new NOT NULL column to an existing PostgreSQL table that has data. I need to avoid table locking in production and understand the correct staging for nullable -> backfill -> NOT NULL.
Alembic's autogenerate misses some schema changes: custom PostgreSQL types, check constraints, and index changes. I need to configure autogenerate to detect more changes and add manual DDL for unsuppo...
Need to split a single `name` column into `first_name` and `last_name` columns. This requires a schema change (add columns, remove old) AND a data migration (populate new columns from old). Pure DDL m...
Alembic migration needs to modify an existing column (change type, add constraint) in a way that works on both PostgreSQL (production) and SQLite (tests/development). PostgreSQL supports ALTER COLUMN ...
Need to run Alembic migrations that work on both PostgreSQL and SQLite. SQLite doesn't support ALTER TABLE for column renames or type changes, causing migration failures in test environments.