Feature Internal Order Notes #12

Merged
derrick merged 3 commits from feat/dg-2-internal-order-notes into master 2026-09-25 03:47:37 +00:00
2 changed files with 6 additions and 0 deletions
Showing only changes of commit 2e2694354d - Show all commits
+5
View File
@@ -90,6 +90,7 @@ export function initializeDatabase(sqlite: Database) {
customer_id TEXT NOT NULL REFERENCES users(id),
shipping_address_id TEXT NOT NULL REFERENCES addresses(id),
status TEXT NOT NULL,
notes TEXT,
created_at TEXT NOT NULL,
updated_at TEXT NOT NULL
);
@@ -119,4 +120,8 @@ export function initializeDatabase(sqlite: Database) {
created_at TEXT NOT NULL
);
`);
if (!columnExists(sqlite, "orders", "notes")) {
sqlite.exec("ALTER TABLE orders ADD COLUMN notes TEXT");
}
}
+1
View File
@@ -9,6 +9,7 @@ export const orders = sqliteTable("orders", {
customerId: text("customer_id").notNull().references(() => users.id),
shippingAddressId: text("shipping_address_id").notNull().references(() => addresses.id),
status: text("status").notNull(),
notes: text("notes"),
createdAt: text("created_at").notNull(),
updatedAt: text("updated_at").notNull()
});