Provides a framework and utilities to upgrade and maintain a relational database.
Python PLpgSQL
Latest commit fca0ae1 Feb 21, 2017 @jmafc jmafc Correct (partially) change 8736714 so the ALTER SEQUENCE OWNED BY sta…

will be generated only if the sequence doesn't already have an owner_table/
owner_column (see issue #157).

  TODO: Change Sequence constructor so that owner_table/owner_column (and
  other attributes) are always present in a Sequence instance, so that
  hasattr logic can be eliminated and we can also implement potential
  changes in OWNED BY.



Pyrseas provides a framework and utilities to upgrade and maintain a PostgreSQL database.


  • Outputs a YAML description of a PostgreSQL database's tables and other objects (metadata), suitable for storing in a version control repository
  • Generates SQL statements to modify a database so that it will match an input YAML/JSON specification
  • (planned) Generates a flexible web application to update PostgreSQL tables


  • PostgreSQL 9.2 or higher
  • Python 2.7 or higher


Pyrseas is free (libre) software and is distributed under the BSD license. Please see the LICENSE file for details.