perf: 移除秒杀相关功能
This commit is contained in:
27
.deploy-tmp/verify-migration.js
Normal file
27
.deploy-tmp/verify-migration.js
Normal file
@@ -0,0 +1,27 @@
|
||||
// Verify migration result on production
|
||||
const { PrismaClient } = require('@prisma/client')
|
||||
const p = new PrismaClient()
|
||||
;(async () => {
|
||||
const tables = await p.$queryRawUnsafe(`
|
||||
SELECT TABLE_NAME
|
||||
FROM information_schema.TABLES
|
||||
WHERE TABLE_SCHEMA = DATABASE()
|
||||
AND TABLE_NAME LIKE '%flash%'
|
||||
`)
|
||||
const ordersCol = await p.$queryRawUnsafe(`
|
||||
SELECT COLUMN_NAME
|
||||
FROM information_schema.COLUMNS
|
||||
WHERE TABLE_SCHEMA = DATABASE()
|
||||
AND TABLE_NAME = 'orders'
|
||||
AND COLUMN_NAME = 'flash_sale_id'
|
||||
`)
|
||||
const mig = await p.$queryRawUnsafe(`
|
||||
SELECT migration_name, finished_at, rolled_back_at
|
||||
FROM _prisma_migrations
|
||||
WHERE migration_name = '20260910030338_drop_flash_sale'
|
||||
`)
|
||||
console.log('flash tables:', tables)
|
||||
console.log('orders.flash_sale_id col:', ordersCol)
|
||||
console.log('migration row:', mig)
|
||||
await p.$disconnect()
|
||||
})().catch((e) => { console.error(e); process.exit(1) })
|
||||
Reference in New Issue
Block a user