Skip to content

override default templates #212

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gflarity opened this issue Feb 8, 2015 · 6 comments
Closed

override default templates #212

gflarity opened this issue Feb 8, 2015 · 6 comments
Labels

Comments

@gflarity
Copy link

gflarity commented Feb 8, 2015

Hi,

Love this module!

Question: Is there way to override the default templates used for migrations?

We use postgres and always include a begin and commit statement in our migrations. Just want to add it to the default.

Thanks

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/8395534-override-default-templates?utm_campaign=plugin&utm_content=tracker%2F73887&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F73887&utm_medium=issues&utm_source=github).
@wzrdtales
Copy link
Member

You can open a pull request adding new templates.

However, I'm looking into introduce a per migration transaction by default. So if a single migration fails everything gets rolled back and migration process stops right there.

Yet this is not within the scope of v0.9.0, but I always appreciate pull request ;)

@wzrdtales
Copy link
Member

Related to #216

@AdriVanHoudt
Copy link

Would it be an option to do require('db-migrate/lib/migration') and override the prototypes?

@wzrdtales
Copy link
Member

No, but we look to extend db-migrate to support real templates for migrations and make them extensible.

@wzrdtales
Copy link
Member

Btw. the question raised at the beginning also included they want to use this to enforce the usage of transactions. Actually db-migrate always place a transaction begin and commit before and after every migration.

@wzrdtales
Copy link
Member

closed in favour of #514

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants