stacker.news/prisma/migrations/20240324192055_zap_undos_in.../migration.sql

5 lines
256 B
SQL

ALTER TABLE "users" ADD COLUMN "zapUndosTmp" INTEGER;
UPDATE "users" SET "zapUndosTmp" = CASE WHEN "zapUndos" = false THEN NULL ELSE 0::INTEGER END;
ALTER TABLE "users" DROP COLUMN "zapUndos";
ALTER TABLE "users" RENAME COLUMN "zapUndosTmp" TO "zapUndos";