Preventing accidental table drops - VittorioDeMarzi/hero-beans GitHub Wiki

Liquibase by nature helps us preventing accidental table drops.

  1. Liquibase's most destructive command, dropAll, is designed with a safety feature. To execute it, you must explicitly add a --force flag. This prevents you from accidentally running it. You should never use this command in a production environment as part of an automated script.

  2. Instead, you must explicitly create a dropTable changeset in a new changelog file. This means the action is intentional and visible in your Git history. It has an id and an author, so you can trace back changes.

In addition, we have created a liquibase_user inside our database, specified in the application-prod.properties without the DROP permission.