-
Notifications
You must be signed in to change notification settings - Fork 976
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(identities): add a state to identities
- Loading branch information
1 parent
6771958
commit a4d43d6
Showing
54 changed files
with
131 additions
and
28 deletions.
There are no files selected for viewing
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
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
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210504121624000000_add_identity_states.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 "identities" DROP COLUMN "state_changed_at"; |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210504121624000000_add_identity_states.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 "identities" ADD COLUMN "state" int NOT NULL DEFAULT '1'; |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210504121624000000_add_identity_states.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 `identities` DROP COLUMN `state_changed_at`; |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210504121624000000_add_identity_states.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 `identities` ADD COLUMN `state` INTEGER NOT NULL DEFAULT 1; |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210504121624000000_add_identity_states.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 "identities" DROP COLUMN "state_changed_at"; |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210504121624000000_add_identity_states.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 "identities" ADD COLUMN "state" int NOT NULL DEFAULT '1'; |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210504121624000000_add_identity_states.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 "_identities_tmp" RENAME TO "identities"; |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210504121624000000_add_identity_states.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 "identities" ADD COLUMN "state" INTEGER NOT NULL DEFAULT '1'; |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210504121624000001_add_identity_states.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 "identities" DROP COLUMN "state"; |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210504121624000001_add_identity_states.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 "identities" ADD COLUMN "state_changed_at" timestamp; |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210504121624000001_add_identity_states.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 `identities` DROP COLUMN `state`; |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210504121624000001_add_identity_states.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 `identities` ADD COLUMN `state_changed_at` DATETIME; |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210504121624000001_add_identity_states.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 "identities" DROP COLUMN "state"; |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210504121624000001_add_identity_states.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 "identities" ADD COLUMN "state_changed_at" timestamp; |
2 changes: 2 additions & 0 deletions
2
persistence/sql/migrations/sql/20210504121624000001_add_identity_states.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 "identities"; |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210504121624000001_add_identity_states.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 "identities" ADD COLUMN "state_changed_at" DATETIME; |
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210504121624000002_add_identity_states.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 "_identities_tmp" (id, schema_id, traits, created_at, updated_at, nid) SELECT id, schema_id, traits, created_at, updated_at, nid FROM "identities"; |
Empty file.
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210504121624000003_add_identity_states.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 "identities_nid_idx" ON "_identities_tmp" (id, nid); |
Empty file.
8 changes: 8 additions & 0 deletions
8
persistence/sql/migrations/sql/20210504121624000004_add_identity_states.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,8 @@ | ||
CREATE TABLE "_identities_tmp" ( | ||
"id" TEXT PRIMARY KEY, | ||
"schema_id" TEXT NOT NULL, | ||
"traits" TEXT NOT NULL, | ||
"created_at" DATETIME NOT NULL, | ||
"updated_at" DATETIME NOT NULL, | ||
"nid" char(36) | ||
); |
Empty file.
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210504121624000005_add_identity_states.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 "identities_nid_idx"; |
Empty file.
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210504121624000006_add_identity_states.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 "_identities_tmp" RENAME TO "identities"; |
Empty file.
2 changes: 2 additions & 0 deletions
2
persistence/sql/migrations/sql/20210504121624000007_add_identity_states.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 "identities"; |
Empty file.
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210504121624000008_add_identity_states.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 "_identities_tmp" (id, schema_id, traits, created_at, updated_at, nid, state_changed_at) SELECT id, schema_id, traits, created_at, updated_at, nid, state_changed_at FROM "identities"; |
Empty file.
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210504121624000009_add_identity_states.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 "identities_nid_idx" ON "_identities_tmp" (id, nid); |
Empty file.
9 changes: 9 additions & 0 deletions
9
persistence/sql/migrations/sql/20210504121624000010_add_identity_states.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,9 @@ | ||
CREATE TABLE "_identities_tmp" ( | ||
"id" TEXT PRIMARY KEY, | ||
"schema_id" TEXT NOT NULL, | ||
"traits" TEXT NOT NULL, | ||
"created_at" DATETIME NOT NULL, | ||
"updated_at" DATETIME NOT NULL, | ||
"nid" char(36), | ||
"state_changed_at" DATETIME | ||
); |
Empty file.
1 change: 1 addition & 0 deletions
1
persistence/sql/migrations/sql/20210504121624000011_add_identity_states.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 "identities_nid_idx"; |
Empty file.
2 changes: 2 additions & 0 deletions
2
persistence/sql/migrations/templates/20210504121624_add_identity_states.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("identities", "state") | ||
drop_column("identities", "state_changed_at") |
2 changes: 2 additions & 0 deletions
2
persistence/sql/migrations/templates/20210504121624_add_identity_states.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,2 @@ | ||
add_column("identities", "state", "int", {"default": 1}) | ||
add_column("identities", "state_changed_at", "timestamp", {"null": true}) |
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
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
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
Oops, something went wrong.