Closed lakesare closed 4 years ago
To whomever takes this issue, - please add
ON DELETE CASCADE
to the user_id too.
CREATE TABLE coauthor (
id SERIAL PRIMARY KEY,
created_at TIMESTAMP NOT NULL DEFAULT timezone('UTC', now()),
user_id INTEGER REFERENCES "user" (id) NOT NULL,
course_id INTEGER REFERENCES course (id) ON DELETE CASCADE NOT NULL,
unique (user_id, course_id)
);
Done ✅
The TIMEZONE setting changed recently on memcode. Everything that's
timezone('UTC', now())
in schema should be justnow()
now.Please create the migration
backend/db/migrations/12.sql
that will change all these fields in db too.