feat: add pill weight and taken by fields to medications schema and update related components

This commit is contained in:
Daniel Volz
2025-12-21 12:21:00 +01:00
parent a7fc360457
commit eb3bfea940
7 changed files with 114 additions and 32 deletions
+2
View File
@@ -14,12 +14,14 @@ export const medications = sqliteTable("medications", {
id: integer("id").primaryKey({ autoIncrement: true }),
name: text("name", { length: 100 }).notNull().unique(),
genericName: text("generic_name", { length: 100 }),
takenBy: text("taken_by", { length: 100 }),
count: integer("count").notNull().default(0),
strips: integer("strips").notNull().default(0),
packCount: integer("pack_count").notNull().default(1),
stripsPerPack: integer("strips_per_pack").notNull().default(1),
tabsPerStrip: integer("tabs_per_strip").notNull().default(1),
looseTablets: integer("loose_tablets").notNull().default(0),
pillWeightMg: integer("pill_weight_mg"),
usageJson: text("usage_json").notNull().default("[]"),
everyJson: text("every_json").notNull().default("[]"),
startJson: text("start_json").notNull().default("[]"),