
      
🐳 Environment: { NODE_ENV: 'production', DATABASE_URL: 'Present', PORT: '3000' }

🔧 Registering all production routes...

🔄 Running automatic production migrations...

🔄 MIGRATION: Starting SAV production migrations...

🔄 MIGRATION: Database URL configured: postgresql://logiflow_admin:Lo...

🔄 MIGRATION: Checking if priority column exists...

❌ MIGRATION ERROR: Failed to run SAV production migrations: NeonDbError: Error connecting to database: fetch failed

    at execute (file:///app/node_modules/@neondatabase/serverless/index.mjs:1549:24)

    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

    at async runProductionMigrations (file:///app/dist/index.js:3263:33)

    at async registerProductionRoutes (file:///app/dist/index.js:6321:3)

    at async file:///app/dist/index.js:6369:1 {

  severity: undefined,

  code: undefined,

  detail: undefined,

  hint: undefined,

  position: undefined,

  internalPosition: undefined,

  internalQuery: undefined,

  where: undefined,

  schema: undefined,

  table: undefined,

  column: undefined,

  dataType: undefined,

  constraint: undefined,

  file: undefined,

  line: undefined,

  routine: undefined,

  sourceError: TypeError: fetch failed

      at node:internal/deps/undici/undici:13510:13

      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

      at async execute (file:///app/node_modules/@neondatabase/serverless/index.mjs:1548:15)

      at async runProductionMigrations (file:///app/dist/index.js:3263:33)

      at async registerProductionRoutes (file:///app/dist/index.js:6321:3)

      at async file:///app/dist/index.js:6369:1 {

    [cause]: Error: connect ECONNREFUSED 172.20.0.10:443

        at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1611:16) {

      errno: -111,

      code: 'ECONNREFUSED',

      syscall: 'connect',

      address: '172.20.0.10',

      port: 443

    }

  }

}

❌ MIGRATION ERROR: Error details: {

  message: 'Error connecting to database: fetch failed',

  code: undefined,

  stack: 'NeonDbError: Error connecting to database: fetch failed\n' +

    '    at execute (file:///app/node_modules/@neondatabase/serverless/index.mjs:1549:24)\n' +

    '    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n' +

    '    at async runProductionMigrations (file:///app/dist/index.js:3263:33)\n' +

    '    at async registerProductionRoutes (file:///app/dist/index.js:6321:3)\n' +

    '    at async file:///app/dist/index.js:6369:1'

}

node:internal/modules/run_main:123

    triggerUncaughtException(

    ^

NeonDbError: Error connecting to database: fetch failed

    at execute (file:///app/node_modules/@neondatabase/serverless/index.mjs:1549:24)

    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

    at async runProductionMigrations (file:///app/dist/index.js:3263:33)

    at async registerProductionRoutes (file:///app/dist/index.js:6321:3)

    at async file:///app/dist/index.js:6369:1 {

  severity: undefined,

  code: undefined,

  detail: undefined,

  hint: undefined,

  position: undefined,

  internalPosition: undefined,

  internalQuery: undefined,

  where: undefined,

  schema: undefined,

  table: undefined,

  column: undefined,

  dataType: undefined,

  constraint: undefined,

  file: undefined,

  line: undefined,

  routine: undefined,

  sourceError: TypeError: fetch failed

      at node:internal/deps/undici/undici:13510:13

      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

      at async execute (file:///app/node_modules/@neondatabase/serverless/index.mjs:1548:15)

      at async runProductionMigrations (file:///app/dist/index.js:3263:33)

      at async registerProductionRoutes (file:///app/dist/index.js:6321:3)

      at async file:///app/dist/index.js:6369:1 {

    [cause]: Error: connect ECONNREFUSED 172.20.0.10:443

        at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1611:16) {

      errno: -111,

      code: 'ECONNREFUSED',

      syscall: 'connect',

      address: '172.20.0.10',

      port: 443

    }

  }

}