[bugfix] fixing schema messed up by something adding tabs
This commit is contained in:
@@ -41,9 +41,9 @@ export const tcgcards = pokeSchema.table('tcg_cards', {
|
||||
stage: varchar({ length: 100 }),
|
||||
weakness: varchar({ length: 100 }),
|
||||
artist: varchar({ length: 255 }),
|
||||
});
|
||||
});
|
||||
|
||||
export const cards = pokeSchema.table('cards', {
|
||||
export const cards = pokeSchema.table('cards', {
|
||||
cardId: integer().notNull().primaryKey().generatedAlwaysAsIdentity(),
|
||||
productId: integer().notNull(),
|
||||
variant: varchar({ length: 100 }).notNull(),
|
||||
@@ -57,12 +57,12 @@ export const tcgcards = pokeSchema.table('tcg_cards', {
|
||||
energyType: varchar({ length: 100 }),
|
||||
number: varchar({ length: 50 }),
|
||||
artist: varchar({ length: 255 }),
|
||||
},
|
||||
(table) => [
|
||||
},
|
||||
(table) => [
|
||||
index('idx_card_product_id').on(table.productId, table.variant),
|
||||
]);
|
||||
]);
|
||||
|
||||
export const tcg_overrides = pokeSchema.table('tcg_overrides', {
|
||||
export const tcg_overrides = pokeSchema.table('tcg_overrides', {
|
||||
productId: integer().primaryKey(),
|
||||
productName: varchar({ length: 255 }),
|
||||
productLineName: varchar({ length: 255 }),
|
||||
@@ -74,16 +74,16 @@ export const tcgcards = pokeSchema.table('tcg_cards', {
|
||||
energyType: varchar({ length: 100 }),
|
||||
number: varchar({ length: 50 }),
|
||||
artist: varchar({ length: 255 }),
|
||||
});
|
||||
});
|
||||
|
||||
export const sets = pokeSchema.table('sets', {
|
||||
export const sets = pokeSchema.table('sets', {
|
||||
setId: integer().primaryKey(),
|
||||
setName: varchar({ length: 255 }).notNull(),
|
||||
setUrlName: varchar({ length: 255 }).notNull(),
|
||||
setCode: varchar({ length: 100 }).notNull(),
|
||||
});
|
||||
});
|
||||
|
||||
export const skus = pokeSchema.table('skus', {
|
||||
export const skus = pokeSchema.table('skus', {
|
||||
skuId: integer().primaryKey(),
|
||||
cardId: integer().default(0).notNull(),
|
||||
productId: integer().notNull(),
|
||||
@@ -95,21 +95,20 @@ export const tcgcards = pokeSchema.table('tcg_cards', {
|
||||
lowestPrice: decimal({ precision: 10, scale: 2 }),
|
||||
marketPrice: decimal({ precision: 10, scale: 2 }),
|
||||
priceCount: integer(),
|
||||
},
|
||||
(table) => [
|
||||
},
|
||||
(table) => [
|
||||
index('idx_product_id_condition').on(table.productId, table.variant),
|
||||
]);
|
||||
]);
|
||||
|
||||
export const priceHistory = pokeSchema.table('price_history', {
|
||||
export const priceHistory = pokeSchema.table('price_history', {
|
||||
skuId: integer().notNull(),
|
||||
calculatedAt: timestamp().notNull(),
|
||||
marketPrice: decimal({ precision: 10, scale: 2 }),
|
||||
},
|
||||
(table) => [
|
||||
},
|
||||
(table) => [
|
||||
primaryKey({ name: 'pk_price_history', columns: [table.skuId, table.calculatedAt] })
|
||||
]);
|
||||
]);
|
||||
|
||||
export const processingSkus = pokeSchema.table('processing_skus', {
|
||||
export const processingSkus = pokeSchema.table('processing_skus', {
|
||||
skuId: integer().primaryKey(),
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user