Skip to content

Commit

Permalink
chore: make nostr pubkey column not null
Browse files Browse the repository at this point in the history
  • Loading branch information
im-adithya committed Dec 24, 2024
1 parent 8eebd41 commit d24748c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
1 change: 0 additions & 1 deletion drizzle/0002_cloudy_nitro.sql

This file was deleted.

1 change: 1 addition & 0 deletions drizzle/0002_green_frightful_four.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE "users" ADD COLUMN "nostr_pubkey" text NOT NULL;
4 changes: 2 additions & 2 deletions drizzle/meta/0002_snapshot.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "b434562b-7a93-4c5f-992b-480f1ca2ed98",
"id": "cc14ef05-cccd-4838-94d5-31521a8d5625",
"prevId": "52607bd8-7a1a-4a34-ad27-91b78733e85c",
"version": "7",
"dialect": "postgresql",
Expand Down Expand Up @@ -167,7 +167,7 @@
"name": "nostr_pubkey",
"type": "text",
"primaryKey": false,
"notNull": false
"notNull": true
},
"created_at": {
"name": "created_at",
Expand Down
4 changes: 2 additions & 2 deletions drizzle/meta/_journal.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
{
"idx": 2,
"version": "7",
"when": 1735019256440,
"tag": "0002_cloudy_nitro",
"when": 1735020701926,
"tag": "0002_green_frightful_four",
"breakpoints": true
}
]
Expand Down
2 changes: 1 addition & 1 deletion src/db/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export const users = pgTable("users", {
id: serial("id").primaryKey(),
encryptedConnectionSecret: text("connection_secret").notNull(),
username: text("username").unique().notNull(),
nostrPubkey: text("nostr_pubkey"),
nostrPubkey: text("nostr_pubkey").notNull(),
createdAt: timestamp("created_at").notNull().defaultNow(),
});

Expand Down

0 comments on commit d24748c

Please sign in to comment.