-
-
Notifications
You must be signed in to change notification settings - Fork 931
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add internal context to login and registration
- Loading branch information
Showing
98 changed files
with
167 additions
and
2 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816113956000000_webauthn.cockroach.down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DELETE FROM identity_credential_types WHERE name = 'webauthn'; |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816113956000000_webauthn.cockroach.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
INSERT INTO identity_credential_types (id, name) SELECT '6b213fa0-e6ad-46cb-8878-b088d2ce2e3c', 'webauthn' WHERE NOT EXISTS ( SELECT * FROM identity_credential_types WHERE name = 'webauthn'); |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816113956000000_webauthn.mysql.down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DELETE FROM identity_credential_types WHERE name = 'webauthn'; |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816113956000000_webauthn.mysql.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
INSERT INTO identity_credential_types (id, name) SELECT '6b213fa0-e6ad-46cb-8878-b088d2ce2e3c', 'webauthn' WHERE NOT EXISTS ( SELECT * FROM identity_credential_types WHERE name = 'webauthn'); |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816113956000000_webauthn.postgres.down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DELETE FROM identity_credential_types WHERE name = 'webauthn'; |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816113956000000_webauthn.postgres.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
INSERT INTO identity_credential_types (id, name) SELECT '6b213fa0-e6ad-46cb-8878-b088d2ce2e3c', 'webauthn' WHERE NOT EXISTS ( SELECT * FROM identity_credential_types WHERE name = 'webauthn'); |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816113956000000_webauthn.sqlite3.down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DELETE FROM identity_credential_types WHERE name = 'webauthn'; |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816113956000000_webauthn.sqlite3.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
INSERT INTO identity_credential_types (id, name) SELECT '6b213fa0-e6ad-46cb-8878-b088d2ce2e3c', 'webauthn' WHERE NOT EXISTS ( SELECT * FROM identity_credential_types WHERE name = 'webauthn'); |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000000_flow_internal_context.cockroach.down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE "selfservice_registration_flows" DROP COLUMN "internal_context"; |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000000_flow_internal_context.cockroach.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE "selfservice_login_flows" ADD COLUMN "internal_context" json; |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000000_flow_internal_context.mysql.down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE `selfservice_registration_flows` DROP COLUMN `internal_context`; |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000000_flow_internal_context.mysql.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE `selfservice_login_flows` ADD COLUMN `internal_context` JSON; |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000000_flow_internal_context.postgres.down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE "selfservice_registration_flows" DROP COLUMN "internal_context"; |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000000_flow_internal_context.postgres.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE "selfservice_login_flows" ADD COLUMN "internal_context" jsonb; |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000000_flow_internal_context.sqlite3.down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE "_selfservice_registration_flows_tmp" RENAME TO "selfservice_registration_flows"; |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000000_flow_internal_context.sqlite3.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE "selfservice_login_flows" ADD COLUMN "internal_context" TEXT; |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000001_flow_internal_context.cockroach.down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE "selfservice_login_flows" DROP COLUMN "internal_context"; |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000001_flow_internal_context.cockroach.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
UPDATE selfservice_login_flows SET internal_context='{}'; |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000001_flow_internal_context.mysql.down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE `selfservice_login_flows` DROP COLUMN `internal_context`; |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000001_flow_internal_context.mysql.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
UPDATE selfservice_login_flows SET internal_context='{}'; |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000001_flow_internal_context.postgres.down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE "selfservice_login_flows" DROP COLUMN "internal_context"; |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000001_flow_internal_context.postgres.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
UPDATE selfservice_login_flows SET internal_context='{}'; |
2 changes: 2 additions & 0 deletions
2
persistence/sql/migrations/sql/20210816142650000001_flow_internal_context.sqlite3.down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
DROP TABLE "selfservice_registration_flows"; |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000001_flow_internal_context.sqlite3.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
UPDATE selfservice_login_flows SET internal_context='{}'; |
Empty file.
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000002_flow_internal_context.cockroach.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE "selfservice_login_flows" RENAME COLUMN "internal_context" TO "_internal_context_tmp"; |
Empty file.
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000002_flow_internal_context.mysql.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE `selfservice_login_flows` MODIFY `internal_context` JSON NOT NULL; |
Empty file.
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000002_flow_internal_context.postgres.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE "selfservice_login_flows" ALTER COLUMN "internal_context" TYPE jsonb, ALTER COLUMN "internal_context" SET NOT NULL; |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000002_flow_internal_context.sqlite3.down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
INSERT INTO "_selfservice_registration_flows_tmp" (id, request_url, issued_at, expires_at, active_method, csrf_token, created_at, updated_at, type, ui, nid) SELECT id, request_url, issued_at, expires_at, active_method, csrf_token, created_at, updated_at, type, ui, nid FROM "selfservice_registration_flows"; |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000002_flow_internal_context.sqlite3.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DROP INDEX IF EXISTS "selfservice_login_flows_nid_idx"; |
Empty file.
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000003_flow_internal_context.cockroach.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE "selfservice_login_flows" ADD COLUMN "internal_context" json; |
Empty file.
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000003_flow_internal_context.mysql.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE `selfservice_registration_flows` ADD COLUMN `internal_context` JSON; |
Empty file.
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000003_flow_internal_context.postgres.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE "selfservice_registration_flows" ADD COLUMN "internal_context" jsonb; |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000003_flow_internal_context.sqlite3.down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
CREATE INDEX "selfservice_registration_flows_nid_idx" ON "_selfservice_registration_flows_tmp" (id, nid); |
16 changes: 16 additions & 0 deletions
16
persistence/sql/migrations/sql/20210816142650000003_flow_internal_context.sqlite3.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
CREATE TABLE "_selfservice_login_flows_tmp" ( | ||
"id" TEXT PRIMARY KEY, | ||
"request_url" TEXT NOT NULL, | ||
"issued_at" DATETIME NOT NULL DEFAULT 'CURRENT_TIMESTAMP', | ||
"expires_at" DATETIME NOT NULL, | ||
"active_method" TEXT NOT NULL, | ||
"csrf_token" TEXT NOT NULL, | ||
"created_at" DATETIME NOT NULL, | ||
"updated_at" DATETIME NOT NULL, | ||
"forced" bool NOT NULL DEFAULT 'false', | ||
"type" TEXT NOT NULL DEFAULT 'browser', | ||
"ui" TEXT, | ||
"nid" char(36), | ||
"requested_aal" TEXT NOT NULL DEFAULT 'aal1', | ||
"internal_context" TEXT NOT NULL | ||
); |
Empty file.
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000004_flow_internal_context.cockroach.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
UPDATE "selfservice_login_flows" SET "internal_context" = "_internal_context_tmp"; |
Empty file.
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000004_flow_internal_context.mysql.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
UPDATE selfservice_registration_flows SET internal_context='{}'; |
Empty file.
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000004_flow_internal_context.postgres.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
UPDATE selfservice_registration_flows SET internal_context='{}'; |
13 changes: 13 additions & 0 deletions
13
persistence/sql/migrations/sql/20210816142650000004_flow_internal_context.sqlite3.down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
CREATE TABLE "_selfservice_registration_flows_tmp" ( | ||
"id" TEXT PRIMARY KEY, | ||
"request_url" TEXT NOT NULL, | ||
"issued_at" DATETIME NOT NULL DEFAULT 'CURRENT_TIMESTAMP', | ||
"expires_at" DATETIME NOT NULL, | ||
"active_method" TEXT NOT NULL, | ||
"csrf_token" TEXT NOT NULL, | ||
"created_at" DATETIME NOT NULL, | ||
"updated_at" DATETIME NOT NULL, | ||
"type" TEXT NOT NULL DEFAULT 'browser', | ||
"ui" TEXT, | ||
"nid" char(36) | ||
); |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000004_flow_internal_context.sqlite3.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
CREATE INDEX "selfservice_login_flows_nid_idx" ON "_selfservice_login_flows_tmp" (id, nid); |
Empty file.
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000005_flow_internal_context.cockroach.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE "selfservice_login_flows" ALTER COLUMN "internal_context" SET NOT NULL; |
Empty file.
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000005_flow_internal_context.mysql.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE `selfservice_registration_flows` MODIFY `internal_context` JSON NOT NULL; |
Empty file.
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000005_flow_internal_context.postgres.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE "selfservice_registration_flows" ALTER COLUMN "internal_context" TYPE jsonb, ALTER COLUMN "internal_context" SET NOT NULL; |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000005_flow_internal_context.sqlite3.down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DROP INDEX IF EXISTS "selfservice_registration_flows_nid_idx"; |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000005_flow_internal_context.sqlite3.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
INSERT INTO "_selfservice_login_flows_tmp" (id, request_url, issued_at, expires_at, active_method, csrf_token, created_at, updated_at, forced, type, ui, nid, requested_aal, internal_context) SELECT id, request_url, issued_at, expires_at, active_method, csrf_token, created_at, updated_at, forced, type, ui, nid, requested_aal, internal_context FROM "selfservice_login_flows"; |
Empty file.
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000006_flow_internal_context.cockroach.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE "selfservice_login_flows" DROP COLUMN "_internal_context_tmp"; |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000006_flow_internal_context.sqlite3.down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE "_selfservice_login_flows_tmp" RENAME TO "selfservice_login_flows"; |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000006_flow_internal_context.sqlite3.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DROP TABLE "selfservice_login_flows"; |
Empty file.
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000007_flow_internal_context.cockroach.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE "selfservice_registration_flows" ADD COLUMN "internal_context" json; |
2 changes: 2 additions & 0 deletions
2
persistence/sql/migrations/sql/20210816142650000007_flow_internal_context.sqlite3.down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
DROP TABLE "selfservice_login_flows"; |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000007_flow_internal_context.sqlite3.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE "_selfservice_login_flows_tmp" RENAME TO "selfservice_login_flows"; |
Empty file.
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000008_flow_internal_context.cockroach.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
UPDATE selfservice_registration_flows SET internal_context='{}'; |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000008_flow_internal_context.sqlite3.down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
INSERT INTO "_selfservice_login_flows_tmp" (id, request_url, issued_at, expires_at, active_method, csrf_token, created_at, updated_at, forced, type, ui, nid, requested_aal) SELECT id, request_url, issued_at, expires_at, active_method, csrf_token, created_at, updated_at, forced, type, ui, nid, requested_aal FROM "selfservice_login_flows"; |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000008_flow_internal_context.sqlite3.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE "selfservice_registration_flows" ADD COLUMN "internal_context" TEXT; |
Empty file.
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000009_flow_internal_context.cockroach.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE "selfservice_registration_flows" RENAME COLUMN "internal_context" TO "_internal_context_tmp"; |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000009_flow_internal_context.sqlite3.down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
CREATE INDEX "selfservice_login_flows_nid_idx" ON "_selfservice_login_flows_tmp" (id, nid); |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000009_flow_internal_context.sqlite3.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
UPDATE selfservice_registration_flows SET internal_context='{}'; |
Empty file.
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000010_flow_internal_context.cockroach.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE "selfservice_registration_flows" ADD COLUMN "internal_context" json; |
15 changes: 15 additions & 0 deletions
15
persistence/sql/migrations/sql/20210816142650000010_flow_internal_context.sqlite3.down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
CREATE TABLE "_selfservice_login_flows_tmp" ( | ||
"id" TEXT PRIMARY KEY, | ||
"request_url" TEXT NOT NULL, | ||
"issued_at" DATETIME NOT NULL DEFAULT 'CURRENT_TIMESTAMP', | ||
"expires_at" DATETIME NOT NULL, | ||
"active_method" TEXT NOT NULL, | ||
"csrf_token" TEXT NOT NULL, | ||
"created_at" DATETIME NOT NULL, | ||
"updated_at" DATETIME NOT NULL, | ||
"forced" bool NOT NULL DEFAULT 'false', | ||
"type" TEXT NOT NULL DEFAULT 'browser', | ||
"ui" TEXT, | ||
"nid" char(36), | ||
"requested_aal" TEXT NOT NULL DEFAULT 'aal1' | ||
); |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000010_flow_internal_context.sqlite3.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DROP INDEX IF EXISTS "selfservice_registration_flows_nid_idx"; |
Empty file.
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000011_flow_internal_context.cockroach.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
UPDATE "selfservice_registration_flows" SET "internal_context" = "_internal_context_tmp"; |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000011_flow_internal_context.sqlite3.down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DROP INDEX IF EXISTS "selfservice_login_flows_nid_idx"; |
14 changes: 14 additions & 0 deletions
14
persistence/sql/migrations/sql/20210816142650000011_flow_internal_context.sqlite3.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
CREATE TABLE "_selfservice_registration_flows_tmp" ( | ||
"id" TEXT PRIMARY KEY, | ||
"request_url" TEXT NOT NULL, | ||
"issued_at" DATETIME NOT NULL DEFAULT 'CURRENT_TIMESTAMP', | ||
"expires_at" DATETIME NOT NULL, | ||
"active_method" TEXT NOT NULL, | ||
"csrf_token" TEXT NOT NULL, | ||
"created_at" DATETIME NOT NULL, | ||
"updated_at" DATETIME NOT NULL, | ||
"type" TEXT NOT NULL DEFAULT 'browser', | ||
"ui" TEXT, | ||
"nid" char(36), | ||
"internal_context" TEXT NOT NULL | ||
); |
Empty file.
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000012_flow_internal_context.cockroach.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE "selfservice_registration_flows" ALTER COLUMN "internal_context" SET NOT NULL; |
Empty file.
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000012_flow_internal_context.sqlite3.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
CREATE INDEX "selfservice_registration_flows_nid_idx" ON "_selfservice_registration_flows_tmp" (id, nid); |
Empty file.
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000013_flow_internal_context.cockroach.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE "selfservice_registration_flows" DROP COLUMN "_internal_context_tmp"; |
Empty file.
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000013_flow_internal_context.sqlite3.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
INSERT INTO "_selfservice_registration_flows_tmp" (id, request_url, issued_at, expires_at, active_method, csrf_token, created_at, updated_at, type, ui, nid, internal_context) SELECT id, request_url, issued_at, expires_at, active_method, csrf_token, created_at, updated_at, type, ui, nid, internal_context FROM "selfservice_registration_flows"; |
Empty file.
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000014_flow_internal_context.sqlite3.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DROP TABLE "selfservice_registration_flows"; |
Empty file.
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210816142650000015_flow_internal_context.sqlite3.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE "_selfservice_registration_flows_tmp" RENAME TO "selfservice_registration_flows"; |
2 changes: 2 additions & 0 deletions
2
persistence/sql/migrations/templates/20210816142650_flow_internal_context.down.fizz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
drop_column("selfservice_login_flows", "internal_context") | ||
drop_column("selfservice_registration_flows", "internal_context") |
7 changes: 7 additions & 0 deletions
7
persistence/sql/migrations/templates/20210816142650_flow_internal_context.up.fizz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
add_column("selfservice_login_flows", "internal_context", "json", { "null": true }) | ||
sql("UPDATE selfservice_login_flows SET internal_context='{}'") | ||
change_column("selfservice_login_flows", "internal_context", "json") | ||
|
||
add_column("selfservice_registration_flows", "internal_context", "json", { "null": true }) | ||
sql("UPDATE selfservice_registration_flows SET internal_context='{}'") | ||
change_column("selfservice_registration_flows", "internal_context", "json") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters