Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Found the answer in the <a href="http://flywaydb.org/documentation/faq.html#downgrade" rel="noreferrer">FAQ</a>:</p> <blockquote> <p><strong>What about downgrade scripts/downward migrations?</strong></p> <p>Flyway does NOT support downgrade scripts.</p> <p>While the idea of downgrade scripts (popularized by Rails Migrations) is a nice one in theory, unfortunately it breaks down in practice. As soon as you have destructive changes (drop, delete, truncate, ...), you start getting into trouble. And even if you don't, you end up creating home-made alternatives for restoring backups, which need to be properly tested as well. </p> <p><strong>Downgrade scripts assume the whole migration failed.</strong></p> <p>A migration can fail at any point. If you have 10 statements, it is possible for the 1st, the 5th, the 7th or the 10th to fail. There is simply no way to know in advance. Downgrade scripts are written to roll back an entire migration. This renders them effectively useless, even for non-destructive changes. </p> <p><strong>Maintain backwards compatibility between the DB and all versions of the code currently deployed in production.</strong></p> <p>This way a failed migration is not a disaster. The old version of the application is still compatible with the DB, so you can simply roll back the application code, investigate, and take corrective measures. </p> <p><strong>A much better solution is a proper, well tested, backup and restore strategy.</strong></p> <p>It is independent of the database structure, and once it is tested and proven to work, no migration script can break it. For optimal performance, and if your infrastructure supports this, we recommend using the <strong>snapshot technology of your underlying storage solution</strong>. Especially for larger data volumes, this can be <strong>several orders of magnitude faster</strong> than traditional backups and restores!</p> </blockquote>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload