I am halfway through a large project replacing some sql server databases with postgres. I decided that it is necessary to version the schema and keep track of functions so I dumped the schema and functions and placed them into git. I had to manually make a version 1 schema by removing some table constraints that rely on functions and adding them with a v1.0.1 script. I am having a hard to organizing all of this. Currently I have one directory that has all our functions, and a new directory for each version of the schema that applies the previous versions changes so you can build the db at any version. This idea falls short though because I don't know how to keep track of functions properly. I have been reading some good articles on the web, like Jeff Atwood's Get Your Database Under Version Control blog but I have not found any examples of how to keep track functions and schema. I also found an example of schema versioning in one of the cloudera repos https://github.com/cloudera/hive/tre...grade/postgres
Does anyone have some examples in git or elsewhere that show how to keep track of schema and functions? I need help figuring this all out - the database is getting unruly with too many functions and schema changes. Thanks!