Skip to content

Conversation

@XeR
Copy link

@XeR XeR commented May 8, 2023

Without this fix, CTFNote will crash in the unlikely event that an invalid CTF exists:

/app/node_modules/postgres-migrations/dist/migrate.js:100
            const error = new Error(`Migration failed. Reason: ${e.message}`);
                          ^

Error: Migration failed. Reason: An error occurred running 'illegal-dates'. Rolled back this migration. No further migrations were run. Reason: check constraint "no_illegal_end_time" of relation "ctf" is violated by some row
    at /app/node_modules/postgres-migrations/dist/migrate.js:100:27
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async /app/node_modules/postgres-migrations/dist/with-lock.js:25:28
    at async /app/node_modules/postgres-migrations/dist/with-connection.js:16:28 {
  cause: Error: An error occurred running 'illegal-dates'. Rolled back this migration. No further migrations were run. Reason: check constraint "no_illegal_end_time" of relation "ctf" is violated by some row
      at /app/node_modules/postgres-migrations/dist/run-migration.js:36:15
      at processTicksAndRejections (node:internal/process/task_queues:96:5)
      at async /app/node_modules/postgres-migrations/dist/migrate.js:91:32
      at async /app/node_modules/postgres-migrations/dist/with-lock.js:25:28
      at async /app/node_modules/postgres-migrations/dist/with-connection.js:16:28
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Without this fix, CTFNote will crash in the unlikely event that an invalid CTF
exists:
```
/app/node_modules/postgres-migrations/dist/migrate.js:100
            const error = new Error(`Migration failed. Reason: ${e.message}`);
                          ^

Error: Migration failed. Reason: An error occurred running 'illegal-dates'. Rolled back this migration. No further migrations were run. Reason: check constraint "no_illegal_end_time" of relation "ctf" is violated by some row
    at /app/node_modules/postgres-migrations/dist/migrate.js:100:27
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async /app/node_modules/postgres-migrations/dist/with-lock.js:25:28
    at async /app/node_modules/postgres-migrations/dist/with-connection.js:16:28 {
  cause: Error: An error occurred running 'illegal-dates'. Rolled back this migration. No further migrations were run. Reason: check constraint "no_illegal_end_time" of relation "ctf" is violated by some row
      at /app/node_modules/postgres-migrations/dist/run-migration.js:36:15
      at processTicksAndRejections (node:internal/process/task_queues:96:5)
      at async /app/node_modules/postgres-migrations/dist/migrate.js:91:32
      at async /app/node_modules/postgres-migrations/dist/with-lock.js:25:28
      at async /app/node_modules/postgres-migrations/dist/with-connection.js:16:28
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
```
@JJ-8 JJ-8 merged commit 2026b0d into JJ-8:0-fix-illegal-dates May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants