@monkeyplus/payscope 1.0.9 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/database.mjs +19 -11
- package/package.json +1 -1
|
@@ -100,7 +100,7 @@ const checkouts = buys.table("checkouts", {
|
|
|
100
100
|
discount: p.jsonb().default({}).$type(),
|
|
101
101
|
totalTax: p.numeric(),
|
|
102
102
|
totalShipping: p.numeric()
|
|
103
|
-
}, (table) => [p.foreignKey({
|
|
103
|
+
}, (table) => [p.index().on(table.sessionId), p.foreignKey({
|
|
104
104
|
columns: [table.sessionId],
|
|
105
105
|
foreignColumns: [sessions.id],
|
|
106
106
|
name: "checkouts_session_id_fkey"
|
|
@@ -231,7 +231,7 @@ const refunds = buys.table("refunds", {
|
|
|
231
231
|
mode: "string"
|
|
232
232
|
}).defaultNow(),
|
|
233
233
|
transactionId: p.bigint({ mode: "number" })
|
|
234
|
-
}, (table) => [p.foreignKey({
|
|
234
|
+
}, (table) => [p.index().on(table.transactionId), p.foreignKey({
|
|
235
235
|
columns: [table.transactionId],
|
|
236
236
|
foreignColumns: [transactions.id],
|
|
237
237
|
name: "refunds_transaction_id_fkey"
|
|
@@ -273,6 +273,9 @@ const transactions = buys.table("transactions", {
|
|
|
273
273
|
seller: p.varchar({ length: 40 }),
|
|
274
274
|
storeId: p.integer()
|
|
275
275
|
}, (table) => [
|
|
276
|
+
p.index().on(table.sessionId),
|
|
277
|
+
p.index().on(table.checkoutId),
|
|
278
|
+
p.index().on(table.storeId),
|
|
276
279
|
p.foreignKey({
|
|
277
280
|
columns: [table.sessionId],
|
|
278
281
|
foreignColumns: [sessions.id],
|
|
@@ -374,15 +377,20 @@ const orders = ecommerce.table("orders", {
|
|
|
374
377
|
extras: p.jsonb(),
|
|
375
378
|
shippingProvider: p.varchar(),
|
|
376
379
|
shipmentDetails: p.jsonb().default([])
|
|
377
|
-
}, (table) => [
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
380
|
+
}, (table) => [
|
|
381
|
+
p.index().on(table.transactionId),
|
|
382
|
+
p.index().on(table.storeId),
|
|
383
|
+
p.foreignKey({
|
|
384
|
+
columns: [table.transactionId],
|
|
385
|
+
foreignColumns: [transactions.id],
|
|
386
|
+
name: "orders_transaction_id_fkey"
|
|
387
|
+
}),
|
|
388
|
+
p.foreignKey({
|
|
389
|
+
columns: [table.storeId],
|
|
390
|
+
foreignColumns: [stores.id],
|
|
391
|
+
name: "orders_store_id_fkey"
|
|
392
|
+
})
|
|
393
|
+
]);
|
|
386
394
|
const products = ecommerce.table("products", {
|
|
387
395
|
id: p.bigserial({ mode: "number" }).primaryKey().notNull(),
|
|
388
396
|
slug: p.varchar(),
|