Page MenuHomePhabricator

D12923.diff
No OneTemporary

D12923.diff

diff --git a/services/identity/src/constants.rs b/services/identity/src/constants.rs
--- a/services/identity/src/constants.rs
+++ b/services/identity/src/constants.rs
@@ -91,6 +91,7 @@
"usernameLower";
pub const RESERVED_USERNAMES_TABLE_USERNAME_LOWER_INDEX: &str =
"usernameLower-index";
+pub const RESERVED_USERNAMES_TABLE_USER_ID_INDEX: &str = "userID-index";
// Users table social proof attribute
pub const SOCIAL_PROOF_MESSAGE_ATTRIBUTE: &str = "siweMessage";
diff --git a/services/terraform/modules/shared/dynamodb.tf b/services/terraform/modules/shared/dynamodb.tf
--- a/services/terraform/modules/shared/dynamodb.tf
+++ b/services/terraform/modules/shared/dynamodb.tf
@@ -287,12 +287,23 @@
type = "S"
}
+ attribute {
+ name = "userID"
+ type = "S"
+ }
+
global_secondary_index {
name = "usernameLower-index"
hash_key = "usernameLower"
projection_type = "INCLUDE"
non_key_attributes = ["userID"]
}
+
+ global_secondary_index {
+ name = "userID-index"
+ hash_key = "userID"
+ projection_type = "KEYS_ONLY"
+ }
}
resource "aws_dynamodb_table" "identity-one-time-keys" {

File Metadata

Mime Type
text/plain
Expires
Fri, Sep 20, 3:34 PM (21 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2151019
Default Alt Text
D12923.diff (1 KB)

Event Timeline