HACC2018 / ohia.ai

MIT License
4 stars 1 forks source link

Database Setup #44

Closed spjy closed 6 years ago

spjy commented 6 years ago

39

mrbarbasa commented 6 years ago

@spjy Sorry I haven't had a chance to look into this; if your last commit works, feel free to merge this in. I've been stuck on image upload and finally got it working, just need to clean code up first. I'll look into this first thing afterwards, so sometime later today. I'll also need the database running to save the image to.

mrbarbasa commented 6 years ago

@spjy Just had to fix the foreign key reference and it ran https://github.com/HACC2018/ohia.ai/pull/44/commits/8da99a29294fee46869907dec8d4e55e0086423e. Created an npm script and ran this from the project root:

▶ npm run db:migrate

> ohia.ai@0.0.1 db:migrate ~/ohia.ai
> knex migrate:latest --knexfile server/knexfile.js

Working directory changed to ~/ohia.ai/server
Using environment: development
Batch 1 run: 2 migrations
~/ohia.ai/server/migrations/20181029191536_plants.js
~/ohia.ai/server/migrations/20181029191551_plant_images.js