R
Railway•6mo ago
Faith

Database migrations are not being run with typeorm

Hello everyone i have been trying for ours trying to get my typeorm mirgrations to run it has access to the database because it created a "migrations" table BUT it wont go in and generate the nessecary migrations and apply them sadly. and i get no error! there are my scripts
"scripts": {
"start": "sleep 3 && tsc && pnpm run sync && pnpm run migrate:run && node ./build/index.js",
"sync": "pnpm typeorm migration:generate /app/build/migration/Init -o -d /app/build/data-source.js",
"migrate:run": "pnpm typeorm migration:run -d /app/build/data-source.js",
"typeorm": "npx typeorm-ts-node-commonjs"
},
"scripts": {
"start": "sleep 3 && tsc && pnpm run sync && pnpm run migrate:run && node ./build/index.js",
"sync": "pnpm typeorm migration:generate /app/build/migration/Init -o -d /app/build/data-source.js",
"migrate:run": "pnpm typeorm migration:run -d /app/build/data-source.js",
"typeorm": "npx typeorm-ts-node-commonjs"
},
Solution:
i forgot to change the path to migration
Jump to solution
17 Replies
Percy
Percy•6mo ago
Project ID: 51cb3e5e-013d-43eb-b545-600daa26b09f
Faith
FaithOP•6mo ago
51cb3e5e-013d-43eb-b545-600daa26b09f
Brody
Brody•6mo ago
does the app ever actually start? since you chain the commands with &&
Faith
FaithOP•6mo ago
No description
Faith
FaithOP•6mo ago
yea it actually dfoes start it shows the health check page
Faith
FaithOP•6mo ago
No description
Faith
FaithOP•6mo ago
these are deploy settings all standard have not touched anything in here other than create url
Brody
Brody•6mo ago
does typeorm have a debug mode or something, because without error messages I'm honestly not sure what I could do for you since I don't have any ideas at the moment
Faith
FaithOP•6mo ago
yea i know right so diffucult let me see one sec sir okay i found the logging deploying now gimme a sec omgggggg
Solution
Faith
Faith•6mo ago
i forgot to change the path to migration
Faith
FaithOP•6mo ago
thank you u made me realize something so obvious you the man
Brody
Brody•6mo ago
no problem!
Faith
FaithOP•6mo ago
i tipped u for your amazing service thank my man how do i put as solved 💀
Brody
Brody•6mo ago
thank you very much, I appreciate it!
Faith
FaithOP•6mo ago
you deserve it!!!! i thank you
Brody
Brody•6mo ago
only mods/admins can do that
Faith
FaithOP•6mo ago
ah okay
Want results from more Discord servers?
Add your server