Open amycommits opened 2 years ago
You can fix (I can if you assign me the issue) the formatting of the README if you use proper Github Markdown like this:
knex migrate:up
knex migrate:latest
knex migrate:down
knex migrate:rollback
$ knex seed:make seed_name
$ knex seed:run
$ knex seed:run --specific=seed-filename.js
@rtkimz I assigned this to you. Please let me know if you need any help with creating the seed!
This depends on https://github.com/duaimei/civic_hacking_hub/issues/72
In the server/db/seeds/development/projects.js file also insert the newList into the newest table: code_project_nonprofits
The code will be chained here with a "then": https://github.com/duaimei/civic_hacking_hub/blob/dev/server/db/seeds/development/projects.js#L48
If you query the projects table by project name from the newList, you will receive the id (project_id), code_organization_id and nonprofit_organization_id.
potential gotchas:
async weirdness
tips:
There is a README in the db folder that has the knex commands for running migrations, and seeding databases. https://github.com/duaimei/civic_hacking_hub/tree/dev/server/db (look at it locally, it isn't formatted correctly on github)