Unchanged schema, `db:push:pg` generates faulty `ALTER` statements

Schema:
CREATE TABLE IF NOT EXISTS "private"."users" (
  "created_at" timestamp NOT NULL,
  "updated_at" timestamp NOT NULL,
  ...
}

Running db:push:pg successively, with no changes to schema:
truncate table "private"."users" cascade;
ALTER TABLE "private"."users" ALTER COLUMN "created_at" SET NOT NULL;
truncate table "private"."users" cascade;
ALTER TABLE "private"."users" ALTER COLUMN "updated_at" SET NOT NULL;
Was this page helpful?