samuelssnider / quantified-self

0 stars 0 forks source link

Seed files not properly dropping and reseeding. #18

Closed samuelssnider closed 6 years ago

samuelssnider commented 6 years ago

When running the seed files to re-seed the database, error:

error: delete from "foods" - update or delete on table "foods" violates foreign key constraint "meal_foods_food_id_fkey" on table "meal_foods"
    at Connection.parseE (/Users/samuelsnider/turing/4module/projects/quantified-self-node/node_modules/pg/lib/connection.js:546:11)
    at Connection.parseMessage (/Users/samuelsnider/turing/4module/projects/quantified-self-node/node_modules/pg/lib/connection.js:371:19)
    at Socket.<anonymous> (/Users/samuelsnider/turing/4module/projects/quantified-self-node/node_modules/pg/lib/connection.js:114:22)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:176:18)
    at Socket.Readable.push (_stream_readable.js:134:10)
    at TCP.onread (net.js:547:20)
samuelssnider commented 6 years ago

Backend Issue: https://github.com/dphilla/quantified-self-node