mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-16 19:00:38 +09:00
Address Greptile review on board CLI auth
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
parent
01b6b7e66a
commit
7f9a76411a
9 changed files with 207 additions and 54 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { pgTable, uuid, text, timestamp, index } from "drizzle-orm/pg-core";
|
||||
import { pgTable, uuid, text, timestamp, index, uniqueIndex } from "drizzle-orm/pg-core";
|
||||
import { authUsers } from "./auth.js";
|
||||
|
||||
export const boardApiKeys = pgTable(
|
||||
|
|
@ -14,7 +14,7 @@ export const boardApiKeys = pgTable(
|
|||
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
||||
},
|
||||
(table) => ({
|
||||
keyHashIdx: index("board_api_keys_key_hash_idx").on(table.keyHash),
|
||||
keyHashIdx: uniqueIndex("board_api_keys_key_hash_idx").on(table.keyHash),
|
||||
userIdx: index("board_api_keys_user_idx").on(table.userId),
|
||||
}),
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue