{"repo":"blainehansen/postgres_migrator","free":true,"listed":false,"github":"https://github.com/blainehansen/postgres_migrator","clone":"git clone https://github.com/blainehansen/postgres_migrator.git","description":"A postgres migration generator and runner that uses raw declarative sql.","language":"Rust","stars":120,"topics":["database","database-migrations","migration","migrations","postgres","raw-sql","rust"],"license":"MIT","category":"databases-storage","readme_excerpt":"postgres migrator postgres migrator allows you to write your postgres schema directly in declarative sql , to automatically generate migrations when you change that declarative schema, and to apply those migrations with rigorous version tracking and consistency checks. No more orms! Use the full power of postgres directly without having to manually write migrations. postgres migrator is able to: - Automatically generate raw sql migrations by diffing the sql in a migrations folder to that in a schema folder. - Apply those migrations and save migration version numbers in the database, so you can know what state a database is supposed to be in. - Run consistency checks on migrations, so that they are only ever applied in the order they were generated. This can prevent very painful debugging and database corruption. postgres migrator intentionally doesn't do the following: - Create \"down\" versions of migrations. If you want to undo something in production, just make a new migration (that's best practice anyway). In dev just force the database into the right state. - Allow running migrations only up to a certain version. postgres migrator will always apply all available unapplied migrations. If you don't want to apply some migrations, move them to a different folder or change their extension to something other than .sql . - Figure out database diffs itself, but instead uses the well-establised migra under the hood. Example If your schema directory contains a sql file like this: Th","default_branch":null,"files":null,"tree":[],"storefront":"/r/blainehansen","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/blainehansen/postgres_migrator/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}