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

standardize the migration and DB setup process #4

Closed
OriHoch opened this issue Jan 10, 2017 · 5 comments · Fixed by #18
Closed

standardize the migration and DB setup process #4

OriHoch opened this issue Jan 10, 2017 · 5 comments · Fixed by #18
Assignees

Comments

@OriHoch
Copy link
Contributor

OriHoch commented Jan 10, 2017

Currently there are duplicated migrations:

Also, there is no standard simple way to run migration (at least from what I could see)

TODO

  • decide on which migration tool we are using and remove the other one
  • create a standardized way to run the migrations - e.g. a bash file bin/run_mgrations.sh
@ripper234
Copy link
Contributor

Odd. I translated the major schema to knex (because it's compatible with other databases including SQLite I introduced for testing). I thought I deleted the main schema.sql file, but apparently not.

Need to:

  1. Synchronize any changes from schema.sql into migrations/20161208025453_init.js (knex)
  2. Delete schema.sql
  3. Check with the team if anyone needs the other SQL files in the sql/ folder (basically they shouldn't ... the initial data should all be in one file right now, and that file's format should be knex).
  4. Mirgate the other files into 20161208025453_init.js knex + delete
  5. Document how to work with knex migrations and inform the teams & team leads.

@ripper234
Copy link
Contributor

BTW regarding your second TODO above: knex is the standard, pretty well documented.
If there's a need for a mini-script (not sure that there is), we can add it to the scripts section of package.json ... but I don't think we need an external bash script.

@OriHoch
Copy link
Contributor Author

OriHoch commented Jan 11, 2017

Cool, I'll do it

@OriHoch
Copy link
Contributor Author

OriHoch commented Jan 12, 2017

@ripper234 - opened a PR which switches to Knex, please review - #15

@OriHoch
Copy link
Contributor Author

OriHoch commented Jan 12, 2017

Follow-up tasks:

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