Skip to content
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

include a migration routine for databases #194

Closed
aeneasr opened this issue Aug 9, 2016 · 5 comments
Closed

include a migration routine for databases #194

aeneasr opened this issue Aug 9, 2016 · 5 comments
Labels
feat New feature or request. help wanted We are looking for help on this one.

Comments

@aeneasr
Copy link
Member

aeneasr commented Aug 9, 2016

No description provided.

@aeneasr aeneasr added the feat New feature or request. label Aug 9, 2016
@aeneasr aeneasr added the help wanted We are looking for help on this one. label Aug 9, 2016
@aeneasr aeneasr added the debt label Aug 17, 2016
@janekolszak
Copy link

I think all database code should be in a separate folder, in separate sql scripts. All tables in one place.
First script would be 001-create-db.sql. When there's an update we add a script 002-some-update.sql
In order to create the database hydra would:

  • create transaction
  • run scripts in order
  • commit

In order to update the database schema hydra would:

  • create transaction
  • run scripts from the updated version to the latest
  • commit

If hydra does this automatically we get rid of the problematic (for user) schema updates.

@aeneasr
Copy link
Member Author

aeneasr commented Oct 26, 2016

@meyerzinn
Copy link

I highly recommend migrate--you can see a great usage of it here.

@aeneasr
Copy link
Member Author

aeneasr commented Nov 29, 2016

awesome, thanks!

@aeneasr
Copy link
Member Author

aeneasr commented Dec 20, 2016

see 070520d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request. help wanted We are looking for help on this one.
Projects
None yet
Development

No branches or pull requests

3 participants