Skip to content

Commit

Permalink
Create Robots table and make all keys "id"
Browse files Browse the repository at this point in the history
More specifically each "id" key is a String and a primary
key. No secondary keys are admitted.

Note for the future: "columns" is a really bad name for
create_dynamodb_table, maybe keys would be better.
  • Loading branch information
chennisden committed May 29, 2024
1 parent c862aff commit 7bdfbc0
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions store/app/api/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,21 @@ async def create_tables(crud: Crud | None = None) -> None:
crud._create_dynamodb_table(
name="Users",
columns=[
("email", "S", "HASH"),
# ("banned", "B", "RANGE"),
# ("deleted", "B", "RANGE"),
("id", "S", "HASH"),
],
),
crud._create_dynamodb_table(
name="Tokens",
columns=[
("email", "S", "HASH"),
# ("issued", "N", "RANGE"),
# ("disabled", "B", "RANGE"),
("id", "S", "HASH"),
],
),
crud._create_dynamodb_table(
name="Robots",
columns=[
("id", "S", "HASH"),
]
)
)


Expand Down

0 comments on commit 7bdfbc0

Please sign in to comment.