...

Text file src/github.com/ory/x/popx/stub/migrations/legacy/20200830130642_add_verification_methods.postgres.down.sql

Documentation: github.com/ory/x/popx/stub/migrations/legacy

     1ALTER TABLE "selfservice_verification_flows" ADD COLUMN "form" jsonb;
     2UPDATE selfservice_verification_flows SET form=(SELECT * FROM (SELECT m.config FROM selfservice_verification_flows AS r INNER JOIN selfservice_verification_flow_methods AS m ON r.id=m.selfservice_verification_flow_id) as t);
     3ALTER TABLE "selfservice_verification_flows" ALTER COLUMN "form" TYPE jsonb, ALTER COLUMN "form" DROP NOT NULL;
     4DROP TABLE "selfservice_verification_flow_methods";
     5ALTER TABLE "selfservice_verification_flows" DROP COLUMN "active_method";
     6ALTER TABLE "selfservice_verification_flows" DROP COLUMN "state";
     7ALTER TABLE "selfservice_verification_flows" ADD COLUMN "via" VARCHAR (16) NOT NULL DEFAULT 'email';
     8ALTER TABLE "selfservice_verification_flows" ADD COLUMN "success" bool NOT NULL DEFAULT FALSE;

View as plain text