[chore] schema for price history
This commit is contained in:
@@ -97,6 +97,15 @@ export const skus = mysqlTable("skus", {
|
||||
index("productIdIdx").on(table.productId, table.variant),
|
||||
]);
|
||||
|
||||
export const priceHistory = mysqlTable("price_history", {
|
||||
skuId: int().default(0).notNull(),
|
||||
calculatedAt: datetime(),
|
||||
marketPrice: decimal({ precision: 10, scale: 2 }),
|
||||
},
|
||||
(table) => [
|
||||
index("idx_price_history").on(table.skuId, table.calculatedAt),
|
||||
]);
|
||||
|
||||
export const processingSkus = mysqlTable("processingSkus", {
|
||||
skuId: int().primaryKey(),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user