https://github.com/djrobstep/migra Skip to content Sign up * Why GitHub? + Features + Mobile + Actions + Codespaces + Packages + Security + Code review + Issues + Integrations + GitHub Sponsors + Customer stories * Team * Enterprise * Explore + Explore GitHub + Learn and contribute + Topics + Collections + Trending + Learning Lab + Open source guides + Connect with others + The ReadME Project + Events + Community forum + GitHub Education + GitHub Stars program * Marketplace * Pricing + Plans + Compare plans + Contact Sales + Education [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this user All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} djrobstep / migra Public * * Notifications * Fork 89 * Star 2.2k * Like diff but for PostgreSQL schemas databaseci.com/docs/migra Unlicense License 2.2k stars 89 forks Star Notifications * Code * Issues 59 * Pull requests 6 * Actions * Projects 0 * Wiki * Security * Insights More * Code * Issues * Pull requests * Actions * Projects * Wiki * Security * Insights This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. master Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags 1 branch 21 tags Code Latest commit @nunico nunico Fix container image build (#178) ... 01acaf2 May 19, 2021 Fix container image build (#178) Fixes #177 Use python:3.9-alpine as base to reduce reliance on alpine maintainers for python and remove already provided packages (python3, python3-dev, ca-certificates). Remove bash since there is already a shell provided and the entrypoint-script is not using bash-exclusive syntax. Change entrypoint-script's shebang from bash to sh & fix array-to-string assignment see https://github.com/koalaman/shellcheck/wiki/SC2124 01acaf2 Git stats * 185 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .circleci fix creation of views dependent on pks Nov 6, 2020 .github cleanup funding file May 8, 2020 deploy tags Aug 28, 2020 docs Add exclude schema option (#152) Oct 7, 2020 migra fix mv index creation order Nov 13, 2020 tests better deferrable handling Jan 13, 2021 .dockerignore Added Dockerfile and .dockerignore Jan 12, 2018 .flake8 .flake8 Oct 28, 2018 .gitignore commit lock file Jan 26, 2021 CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md Apr 7, 2019 Dockerfile Fix container image build (#178) May 20, 2021 LICENSE initial commit Jul 25, 2016 MANIFEST.in new docs Aug 20, 2017 Makefile add test output Mar 3, 2019 README.md minor readme edit Sep 2, 2020 build-docker.sh Improved Docker container. Aug 5, 2018 docker-entrypoint.sh Fix container image build (#178) May 20, 2021 poetry.lock first py3 only release Jan 28, 2021 pyproject.toml Add build-system section to pyproject.toml (PEP-517) (#176) Mar 21, 2021 View code [ ] migra: Like diff but for Postgres schemas compare schemas autogenerate migration scripts autosync your development database from your application models make your schema changes testable, robust, and (mostly) automatic THE DOCS Folks, schemas are good Contributing Credits README.md migra: Like diff but for Postgres schemas * compare schemas * autogenerate migration scripts * autosync your development database from your application models * make your schema changes testable, robust, and (mostly) automatic migra is a schema diff tool for PostgreSQL, written in Python. Use it in your python scripts, or from the command line like this: $ migra postgresql:///a postgresql:///b alter table "public"."products" add column newcolumn text; alter table "public"."products" add constraint "x" CHECK ((price > (0)::numeric)); migra magically figures out all the statements required to get from A to B. Most features of PostgreSQL are supported. Migra supports PostgreSQL >= 9 only. Known issues exist with earlier versions. More recent versions are more comprehensively tested. Development resources are limited, and feature support rather than backwards compatibility is prioritised. THE DOCS Documentation is at databaseci.com/docs/migra. Folks, schemas are good Schema migrations are without doubt the most cumbersome and annoying part of working with SQL databases. So much so that some people think that schemas themselves are bad! But schemas are actually good. Enforcing data consistency and structure is a good thing. It's the migration tooling that is bad, because it's harder to use than it should be. migra is an attempt to change that, and make migrations easy, safe, and reliable instead of something to dread. Contributing Contributing is easy. Jump into the issues, find a feature or fix you'd like to work on, and get involved. Or create a new issue and suggest something completely different. If you're unsure about any aspect of the process, just ask. Credits * djrobstep: initial development, maintenance * alvarogzp: privileges support * seblucas: docker improvements * MOZGIII: docker support * mshahbazi: misc fixes and enhancements About Like diff but for PostgreSQL schemas databaseci.com/docs/migra Topics python schema-migrations postgresql developer-tools developer-experience schema-changes Resources Readme License Unlicense License Code of conduct Code of conduct Stars 2.2k stars Watchers 38 watching Forks 89 forks Releases 21 tags Sponsor this project Sponsor Learn more about GitHub Sponsors Packages 0 No packages published Contributors 13 * @djrobstep * @alvarogzp * @mshahbazi * @donbeave * @tad-lispy * @lazydba247 * @jakelevirne * @jasongi-actu * @nunico * @MOZGIII * @seblucas + 2 contributors Languages * Python 62.3% * PLpgSQL 35.5% * Other 2.2% * (c) 2022 GitHub, Inc. * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.