MVP for API Key authentication
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import { integer, pgTable, primaryKey, smallint, text } from 'drizzle-orm/pg-core'
|
||||
|
||||
export const weeklyIdCounters = pgTable(
|
||||
'weekly_id_counters',
|
||||
{
|
||||
prefix: text('prefix').notNull(),
|
||||
yy: smallint('yy').notNull(),
|
||||
ww: smallint('ww').notNull(),
|
||||
lastValue: integer('last_value').notNull(),
|
||||
},
|
||||
(t) => [
|
||||
primaryKey({ columns: [t.prefix, t.yy, t.ww] }),
|
||||
],
|
||||
)
|
||||
Reference in New Issue
Block a user