Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32890129
D12923.1768169639.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D12923.1768169639.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Sun, Jan 11, 10:13 PM (4 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5918098
Default Alt Text
D12923.1768169639.diff (1 KB)
Attached To
Mode
D12923: [terraform][dynamodb] Add userID index to reserved usernames table
Attached
Detach File
Event Timeline
Log In to Comment