update payment method, remove stripe, paypal, amanapay
Build & Push / Pipeline Tests (push) Failing after 59s
Build & Push / Build & Push Docker Image (push) Has been skipped
Test / Type Check (all packages) (push) Failing after 48s
Test / API Unit Tests (push) Has been skipped
Test / Homepage Unit Tests (push) Has been skipped
Test / Carplace Unit Tests (push) Has been skipped
Test / Admin Unit Tests (push) Has been skipped
Test / Dashboard Unit Tests (push) Has been skipped
Test / API Integration Tests (push) Has been skipped
Build & Push / Pipeline Tests (push) Failing after 59s
Build & Push / Build & Push Docker Image (push) Has been skipped
Test / Type Check (all packages) (push) Failing after 48s
Test / API Unit Tests (push) Has been skipped
Test / Homepage Unit Tests (push) Has been skipped
Test / Carplace Unit Tests (push) Has been skipped
Test / Admin Unit Tests (push) Has been skipped
Test / Dashboard Unit Tests (push) Has been skipped
Test / API Integration Tests (push) Has been skipped
This commit is contained in:
@@ -98,7 +98,7 @@ async function main() {
|
||||
|
||||
const failedMigrations = state.hasMigrationsTable
|
||||
? await prisma.$queryRawUnsafe(`
|
||||
SELECT migration_name
|
||||
SELECT migration_name, logs
|
||||
FROM "_prisma_migrations"
|
||||
WHERE finished_at IS NULL
|
||||
AND rolled_back_at IS NULL
|
||||
@@ -149,11 +149,29 @@ async function main() {
|
||||
}
|
||||
|
||||
if (failedMigrations.length > 0) {
|
||||
console.error('[db:deploy] Found failed migrations in a non-empty database. Resolve them manually before deploying again.')
|
||||
for (const migration of failedMigrations) {
|
||||
console.error(`- ${migration.migration_name}`)
|
||||
console.error(`[db:deploy] Failed migration ${migration.migration_name}`)
|
||||
if (migration.logs) console.error(migration.logs)
|
||||
}
|
||||
|
||||
// Prisma records a failed transactional migration even after the SQL rolls back.
|
||||
// In local/dev Docker that leftover row blocks every subsequent startup.
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
console.error('[db:deploy] Found failed migrations in a non-empty database. Resolve them manually before deploying again.')
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
console.log('[db:deploy] Marking failed migrations as rolled back so they can be retried')
|
||||
for (const migration of failedMigrations) {
|
||||
run(prismaBin, [
|
||||
'migrate',
|
||||
'resolve',
|
||||
'--schema',
|
||||
schemaPath,
|
||||
'--rolled-back',
|
||||
migration.migration_name,
|
||||
])
|
||||
}
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
console.log('[db:deploy] Existing database detected; applying Prisma migrations')
|
||||
|
||||
Reference in New Issue
Block a user