database seeds successfully

This commit is contained in:
Mikayla Dobson
2022-11-18 09:41:57 -06:00
parent 74eefad05a
commit f57c96a80e

View File

@@ -62,7 +62,6 @@ dotenv.config();
CREATE TABLE IF NOT EXISTS recipin.cmp_users_collections ( CREATE TABLE IF NOT EXISTS recipin.cmp_users_collections (
users_collections_id INT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, users_collections_id INT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
collection_id int REFERENCES recipin.collection (id), collection_id int REFERENCES recipin.collection (id),
owner_id int REFERENCES recipin.collection (owner_id),
user_member_id int REFERENCES recipin.app_users (id) user_member_id int REFERENCES recipin.app_users (id)
); );
`; `;
@@ -72,7 +71,7 @@ dotenv.config();
] ]
const client = new Client({ connectionString: process.env.CONSTRING }); const client = new Client({ connectionString: process.env.CONSTRING });
await client.connect().then(() => console.log('connected to pg at ' + process.env.CONSTRING)); await client.connect().then(() => console.log('connected to pg. seeding...'));
try { try {
for (let s of allStatements) { for (let s of allStatements) {