Milestone v1.0: FamilySync MVP #1
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE `push_subscriptions` MODIFY COLUMN `endpoint` varchar(2048) NOT NULL;--> statement-breakpoint
|
||||
ALTER TABLE `push_subscriptions` MODIFY COLUMN `p256dh` varchar(512) NOT NULL;
|
||||
@@ -240,8 +240,11 @@ export const pushSubscriptions = mysqlTable(
|
||||
userId: int('user_id')
|
||||
.notNull()
|
||||
.references(() => users.id, { onDelete: 'cascade' }),
|
||||
endpoint: text('endpoint').notNull(),
|
||||
p256dh: text('p256dh').notNull(),
|
||||
// CR-02: varchar(2048) matches the Zod max(2048) bound and avoids the InnoDB
|
||||
// silent prefix-index truncation that occurs on unbounded text columns.
|
||||
// varchar(512) for p256dh matches the Zod max(512) bound.
|
||||
endpoint: varchar('endpoint', { length: 2048 }).notNull(),
|
||||
p256dh: varchar('p256dh', { length: 512 }).notNull(),
|
||||
auth: varchar('auth', { length: 256 }).notNull(),
|
||||
createdAt: timestamp('created_at').defaultNow().notNull(),
|
||||
updatedAt: timestamp('updated_at').defaultNow().onUpdateNow(),
|
||||
|
||||
Reference in New Issue
Block a user