github.com/icyphox/x@v0.0.355-0.20220311094250-029bd783e8b8/popx/stub/migrations/legacy/20191100000002_requests.postgres.up.sql (about) 1 CREATE TABLE "selfservice_login_requests" ( 2 "id" UUID NOT NULL, 3 PRIMARY KEY("id"), 4 "request_url" VARCHAR (2048) NOT NULL, 5 "issued_at" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 6 "expires_at" timestamp NOT NULL, 7 "active_method" VARCHAR (32) NOT NULL, 8 "csrf_token" VARCHAR (255) NOT NULL, 9 "created_at" timestamp NOT NULL, 10 "updated_at" timestamp NOT NULL 11 ); 12 CREATE TABLE "selfservice_login_request_methods" ( 13 "id" UUID NOT NULL, 14 PRIMARY KEY("id"), 15 "method" VARCHAR (32) NOT NULL, 16 "selfservice_login_request_id" UUID NOT NULL, 17 "config" jsonb NOT NULL, 18 "created_at" timestamp NOT NULL, 19 "updated_at" timestamp NOT NULL, 20 FOREIGN KEY ("selfservice_login_request_id") REFERENCES "selfservice_login_requests" ("id") ON DELETE cascade 21 ); 22 CREATE TABLE "selfservice_registration_requests" ( 23 "id" UUID NOT NULL, 24 PRIMARY KEY("id"), 25 "request_url" VARCHAR (2048) NOT NULL, 26 "issued_at" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 27 "expires_at" timestamp NOT NULL, 28 "active_method" VARCHAR (32) NOT NULL, 29 "csrf_token" VARCHAR (255) NOT NULL, 30 "created_at" timestamp NOT NULL, 31 "updated_at" timestamp NOT NULL 32 ); 33 CREATE TABLE "selfservice_registration_request_methods" ( 34 "id" UUID NOT NULL, 35 PRIMARY KEY("id"), 36 "method" VARCHAR (32) NOT NULL, 37 "selfservice_registration_request_id" UUID NOT NULL, 38 "config" jsonb NOT NULL, 39 "created_at" timestamp NOT NULL, 40 "updated_at" timestamp NOT NULL, 41 FOREIGN KEY ("selfservice_registration_request_id") REFERENCES "selfservice_registration_requests" ("id") ON DELETE cascade 42 ); 43 CREATE TABLE "selfservice_profile_management_requests" ( 44 "id" UUID NOT NULL, 45 PRIMARY KEY("id"), 46 "request_url" VARCHAR (2048) NOT NULL, 47 "issued_at" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 48 "expires_at" timestamp NOT NULL, 49 "form" jsonb NOT NULL, 50 "update_successful" bool NOT NULL, 51 "identity_id" UUID NOT NULL, 52 "created_at" timestamp NOT NULL, 53 "updated_at" timestamp NOT NULL, 54 FOREIGN KEY ("identity_id") REFERENCES "identities" ("id") ON DELETE cascade 55 );