best practice for dealing functions/stored procedures on an existing database

Greetings,


I would like to hear your opinion on dealing with functions/stored procedures with Liquibase on an existing database.

I have a postgresql database with a lot of functions for different schemas.


So far i think to use pg_dump of whole db as my initial change log, apply it to database and using the recently introduced sql format. All I need to do is to add one comment with liquibase metadata  to the pg dump text file.

Are there any pitfalls?

Has someone faced similar problem?


Best Regards

Vitaliy



That is probably the best approach if you have a lot of stored procedures since Liquibase does not try to snapshot them with the generateChangeLog functionality.


By add one one comment" you mean adding the --liquibase formatted sql comment? You can do that, but you can also leave it off and liquibase will also run it as one big changeset.


Nathan