a year ago
"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",
"sentry:sourcemaps": "sentry-cli sourcemaps inject --org define-waters --project node-express ./build && sentry-cli sourcemaps upload --org define-waters --project node-express ./build"
hey guys i hvae this issue with when my migrations are being synced/generated it some how fails and wont run due to there no migration being generated ( which is okay, dont make if cant find ) but for some reason when it hits the migration:run
the app starts over from zero again -.-
0 Replies
a year ago
full deploy logs please - https://bookmarklets.up.railway.app/log-downloader/
No changes in database schema were found - cannot generate a migration. To create a new empty migration use "typeorm migration:create" command`
INFO: All classes found using provided glob pattern "/app/build/entity/*.js" : "/app/build/entity/Addresser.js,/app/build/entity/Admin.js,/app/build/entity/BookeableItem.js,/app/build/entity/Bookings.js,/app/build/entity/Category.js,/app/build/entity/CategoryItem.js,/app/build/entity/CouponCode.js,/app/build/entity/CouponItem.js,/app/build/entity/Coupons.js,/app/build/entity/Order.js,/app/build/entity/Reciepts.js,/app/build/entity/ServiceBookable.js,/app/build/entity/ServiceBooking.js,/app/build/entity/Users.js"
INFO: No classes were found using the provided glob pattern: "/app/build/migration/*.js"
it finds the entites no problem but then ofc no migrations are suppose to be found since it up to date which is fine
a year ago
change the &&
after the migration command to a semicolon
a year ago
that's not a semicolon
"start": "sleep 3 && tsc && pnpm run sync; pnpm run migrate:run && pnpm sentry:sourcemaps && node ./build/index.js",
a year ago
yep
"start": "sleep 3 && tsc && pnpm run sync && pnpm run migrate:run; pnpm sentry:sourcemaps && node ./build/index.js",
a year ago
that's just a quick work around, the correct solution would be to have the migration command exit with 0 if there are no migrations to run
a year ago
that would kinda be out of scope as it wouldn't have anything to do with the platform or running your app on the platform
a year ago
I'm sure you could find some information about what I've said, I'm just trying to get you running and then point you in the correct direction
a year ago
deploy logs please
a year ago
give it a try
a year ago
this, I replied to the wrong message
a year ago
no problem!