steder / goose

Simple configuration driven SQL migration tool
MIT License
3 stars 0 forks source link

Templates for Migrations #9

Open steder opened 12 years ago

steder commented 12 years ago

$ goose [options] new --engine=postgresql

Creates a template file .sql and .rollback.sql and adds them to the configuration file.

These templates would include in the comments a quick reference to the common syntax for creating a stored proc, view, table, or altering any of the above for a specific DB engine. The template would only include comments and would not do anything by default but act as a quick starting point.

This could be smarter to be templates for specific things. E.g.:

$ goose [options] alter table $ goose [options] create table
$ goose [options] create view