chore(db): 新增 CSV 历史汇率播种脚本及表唯一约束
This commit is contained in:
+3
-1
@@ -105,4 +105,6 @@ export const exchangeRatesHistory = pgTable("exchange_rates_history", {
|
||||
createdAt: timestamp("created_at", { withTimezone: true, mode: "date" })
|
||||
.defaultNow()
|
||||
.notNull(),
|
||||
});
|
||||
}, (table) => ({
|
||||
unq: unique("rate_time_unq").on(table.fromCurrency, table.toCurrency, table.fetchTime),
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user