]> WPIA git - gigi.git/blobdiff - src/club/wpia/gigi/database/upgrade/from_9.sql
upd: rename package name and all references to it
[gigi.git] / src / club / wpia / gigi / database / upgrade / from_9.sql
diff --git a/src/club/wpia/gigi/database/upgrade/from_9.sql b/src/club/wpia/gigi/database/upgrade/from_9.sql
new file mode 100644 (file)
index 0000000..ec2b0be
--- /dev/null
@@ -0,0 +1,5 @@
+ALTER TABLE "emailPinglog" ADD COLUMN "challenge" varchar(255) NULL DEFAULT NULL;
+
+INSERT INTO "emailPinglog" SELECT CURRENT_TIMESTAMP AS "when", "memid" AS "uid", "email", 'active'::"emailPingType" AS "type", CASE WHEN "hash"='' THEN 'success'::"pingState" ELSE 'open'::"pingState" END AS state, '' AS result, "hash" AS "challenge" FROM "emails";
+ALTER TABLE "emails" DROP COLUMN "attempts";
+ALTER TABLE "emails" DROP COLUMN "hash";