Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration failing if project already have migration setup using typeorm #13

Open
mickyarun opened this issue Oct 10, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@mickyarun
Copy link

mickyarun commented Oct 10, 2023

Description

We are already using typeorm for migration, so getting following issue while using the package

(node:8882) UnhandledPromiseRejectionWarning: Error: Migration failed. Reason: Hashes don't match for migrations '0_create-migrations-table.sql,1-init.sql,2-add-db-functions-agg.sql,3-add-db-functions-ind.sql,4-add-db-functions-sessions.sql,5-hotfix-update-constraints.sql'.
This means that the scripts have changed since it was applied.
    at /Users/arunrajkumar/Documents/code/ATOACore/node_modules/postgres-migrations/dist/migrate.js:100:27
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at /Users/arunrajkumar/Documents/code/ATOACore/node_modules/postgres-migrations/dist/with-lock.js:25:28
    at /Users/arunrajkumar/Documents/code/ATOACore/node_modules/postgres-migrations/dist/with-connection.js:16:28
    at applyMigrations (/Users/arunrajkumar/Documents/code/ATOACore/node_modules/@acpr/rate-limit-postgresql/dist/index.cjs:78:3)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:8882) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 3)
(node:8882) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Library version

1.3.1

Node version

14.9.2

Typescript version (if you are using it)

4.5.5

Module system

ESM

@mickyarun mickyarun added the bug Something isn't working label Oct 10, 2023
@mickyarun
Copy link
Author

#14 , handle the migration in your base project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant