mirror of
https://github.com/whekin/household-bot.git
synced 2026-03-31 19:14:03 +00:00
feat(locale): persist household and member preferences
This commit is contained in:
2
packages/db/drizzle/0008_lowly_spiral.sql
Normal file
2
packages/db/drizzle/0008_lowly_spiral.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE "households" ADD COLUMN "default_locale" text DEFAULT 'ru' NOT NULL;--> statement-breakpoint
|
||||
ALTER TABLE "members" ADD COLUMN "preferred_locale" text;--> statement-breakpoint
|
||||
2143
packages/db/drizzle/meta/0008_snapshot.json
Normal file
2143
packages/db/drizzle/meta/0008_snapshot.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -57,6 +57,13 @@
|
||||
"when": 1773051000000,
|
||||
"tag": "0007_sudden_murmur",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 8,
|
||||
"version": "7",
|
||||
"when": 1773047624171,
|
||||
"tag": "0008_lowly_spiral",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ import {
|
||||
export const households = pgTable('households', {
|
||||
id: uuid('id').defaultRandom().primaryKey(),
|
||||
name: text('name').notNull(),
|
||||
defaultLocale: text('default_locale').default('ru').notNull(),
|
||||
createdAt: timestamp('created_at', { withTimezone: true }).defaultNow().notNull()
|
||||
})
|
||||
|
||||
@@ -142,6 +143,7 @@ export const members = pgTable(
|
||||
.references(() => households.id, { onDelete: 'cascade' }),
|
||||
telegramUserId: text('telegram_user_id').notNull(),
|
||||
displayName: text('display_name').notNull(),
|
||||
preferredLocale: text('preferred_locale'),
|
||||
isAdmin: integer('is_admin').default(0).notNull(),
|
||||
joinedAt: timestamp('joined_at', { withTimezone: true }).defaultNow().notNull()
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user