[feat] sync now loops through card sets

This commit is contained in:
2026-02-20 05:49:05 -05:00
parent 81b223ae65
commit 1ed2c4fcfe
3 changed files with 49 additions and 26 deletions

View File

@@ -12,17 +12,17 @@ export const cards = mysqlTable("cards", {
rarityName: varchar({ length: 100 }).default("").notNull(),
sealed: boolean().default(false).notNull(),
sellerListable: boolean().default(false).notNull(),
setId: int().default(0).notNull(),
shippingCategoryId: int().default(0).notNull(),
setId: int(),
shippingCategoryId: int(),
duplicate: boolean().default(false).notNull(),
foilOnly: boolean().default(false).notNull(),
maxFulfillableQuantity: int().default(0).notNull(),
totalListings: int().default(0).notNull(),
score: decimal({ precision: 10, scale: 2, mode: 'number' }).default(0).notNull(),
lowestPrice: decimal({ precision: 10, scale: 2, mode: 'number' }).default(0).notNull(),
lowestPriceWithShipping: decimal({ precision: 10, scale: 2, mode: 'number' }).default(0).notNull(),
marketPrice: decimal({ precision: 10, scale: 2, mode: 'number' }).default(0).notNull(),
medianPrice: decimal({ precision: 10, scale: 2, mode: 'number' }).default(0).notNull(),
maxFulfillableQuantity: int(),
totalListings: int(),
score: decimal({ precision: 10, scale: 2, mode: 'number' }),
lowestPrice: decimal({ precision: 10, scale: 2, mode: 'number' }),
lowestPriceWithShipping: decimal({ precision: 10, scale: 2, mode: 'number' }),
marketPrice: decimal({ precision: 10, scale: 2, mode: 'number' }),
medianPrice: decimal({ precision: 10, scale: 2, mode: 'number' }),
attack1: varchar({ length: 1024 }),
attack2: varchar({ length: 1024 }),
attack3: varchar({ length: 1024 }),
@@ -31,7 +31,7 @@ export const cards = mysqlTable("cards", {
cardTypeB: varchar({ length: 100 }),
energyType: varchar({ length: 100 }),
flavorText: varchar({ length: 1000 }),
hp: int().default(0).notNull(),
hp: int(),
number: varchar({ length: 50 }).default("").notNull(),
releaseDate: datetime(),
resistance: varchar({ length: 100 }),