summaryrefslogtreecommitdiffstats
path: root/lib/sql/migration/011-patch-change-notifications.sql
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sql/migration/011-patch-change-notifications.sql')
-rw-r--r--lib/sql/migration/011-patch-change-notifications.sql12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/sql/migration/011-patch-change-notifications.sql b/lib/sql/migration/011-patch-change-notifications.sql
new file mode 100644
index 0000000..0a9b9b7
--- /dev/null
+++ b/lib/sql/migration/011-patch-change-notifications.sql
@@ -0,0 +1,12 @@
+BEGIN;
+CREATE TABLE "patchwork_patchchangenotification" (
+ "patch_id" integer NOT NULL PRIMARY KEY REFERENCES "patchwork_patch" ("id") DEFERRABLE INITIALLY DEFERRED,
+ "last_modified" timestamp with time zone NOT NULL,
+ "orig_state_id" integer NOT NULL REFERENCES "patchwork_state" ("id") DEFERRABLE INITIALLY DEFERRED
+)
+;
+ALTER TABLE "patchwork_project" ADD COLUMN
+ "send_notifications" boolean NOT NULL DEFAULT False;
+ALTER TABLE "patchwork_project" ALTER COLUMN
+ "send_notifications" DROP DEFAULT;
+COMMIT;