• Mayra Cabrera's avatar
    Migrations guide: use atomic steps, when possible · 9d5ea420
    Mayra Cabrera authored
    Currently, the DB migrations guide says that "you must" use non-blocking
    operations (such as CREATE INDEX CONCURRENTLY), always.
    
    But this does not make sense in cases of empty tables and leads to
    splitting the work to multiple non-atomic
    (with disable_ddl_transaction!) DB migrations.
    
    To follow KISS principle, to have fewer DB migrations steps,
    to have them atomic when it's possible and simplify deployment
    and troubleshooting, the following exceptions were added
    to the doc:
    
    - index creation,
    - index dropping,
    - defining an FK,
    - adding a column with DEFAULT,
    9d5ea420
database_review.md 6.92 KB