benawad/graphql-express-template

pg npm

Closed this issue · 6 comments

seems to require pg < 7. pg 7.0.2 has connection.query(...).on error. should pg be added to package.json?

sequelize script hangs on the following query:
Executing (default): CREATE TABLE IF NOT EXISTS "local_auths" ("id" SERIAL , "email" VARCHAR(255) UNIQUE, "password" VARCHAR(255), "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL, "user_id" INTEGER REFERENCES "Users" ("id") ON DELETE SET NULL ON UPDATE CASCADE, UNIQUE ("email"), PRIMARY KEY ("id"));
Executing (default): SELECT i.relname AS name, ix.indisprimary AS primary, ix.indisunique AS unique, ix.indkey AS indkey, array_agg(a.attnum) as column_indexes, array_agg(a.attname) AS column_names, pg_get_indexdef(ix.indexrelid) AS definition FROM pg_class t, pg_class i, pg_index ix, pg_attribute a WHERE t.oid = ix.indrelid AND i.oid = ix.indexrelid AND a.attrelid = t.oid AND t.relkind = 'r' and t.relname = 'local_auths' GROUP BY i.relname, ix.indexrelid, ix.indisprimary, ix.indisunique, ix.indkey ORDER BY i.relname;

setting .sync({force: true}) unfortunately didn't help.

If a package needed pg it should install it has a dependency. You could try installing it and seeing if that helps. Did you create the database before starting the server?

Do you just have a lot of data in your database?

Ben, turns out it was just user error. I just assumed sequelize had hung but really I was just looking at the last message logged to the console. I've learned a ton from watching your videos. Thanks for making them!

Glad you figured it out 👍