NestJs migrations with TypeORM 0.3 (latest) - How to set it up from scratch using Datasource

NestJs migrations with TypeORM 0.3 (latest) - How to set it up from scratch using Datasource

Amitav Roy

1 год назад

42,560 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@vladislavderkach2647
@vladislavderkach2647 - 07.12.2023 17:51

Thank you, bro. It was very helpful!

Ответить
@jaganath15
@jaganath15 - 24.11.2023 07:17

Thanks❤, it's working like a charm

Ответить
@mariemmatri8743
@mariemmatri8743 - 24.10.2023 20:12

Thank you so much! I also liked how you figured out the issues in the video without cutting the video

Ответить
@_vlmdr
@_vlmdr - 17.10.2023 22:55

Help me a lot! Thanks man

Ответить
@yaumiadz
@yaumiadz - 11.10.2023 17:22

thx, it's useful af. like it

Ответить
@CaminoConDiego
@CaminoConDiego - 10.10.2023 16:53

Dude! Thanks a lot seriously! This video must be at Nestjs and Typeform docs!!! Can not believe that I almost lost the day trying to find a way to create my migration

Ответить
@shalandichannel
@shalandichannel - 02.10.2023 20:56

do you why i might get this error:

Error during migration generation:
TypeError
at Reflect.getMetadat

sounds familiar ?

Ответить
@victorm9131
@victorm9131 - 25.09.2023 11:37

Extremely helpful video. Thanks a lot!

Ответить
@khaledali777
@khaledali777 - 22.09.2023 17:39

I have been struggling to make it happen. You made my day. 👍

Ответить
@budgeter4807
@budgeter4807 - 20.09.2023 15:03

No amount of words can explain how thankful I am. Umetisha chief...

Ответить
@iamabhirupdatta
@iamabhirupdatta - 20.09.2023 09:11

Hey, i am having issues when doing this in a express-ts project without nextjs. I have a src folder which contains ts files and a dist folder which output js files in same name as ts except with .js extension. Everything is working except the migrations commands.
"start": "cross-env NODE_ENV=dev node dist/server.js",
"typeorm": "npm run start && ts-node ./node_modules/typeorm/cli",
"typeorm:generate-migration:win": "npm run typeorm -- -d ./src/api/database/initialize.ts migration:generate ./dist/api/database/migrations/FirstMigration"

The commands run but the migration file doesnot generate. Please help

Ответить
@islamicworld5086
@islamicworld5086 - 17.09.2023 21:16

God bless u sir

Ответить
@islamicworld5086
@islamicworld5086 - 17.09.2023 21:16

Thanks

Ответить
@islamicworld5086
@islamicworld5086 - 17.09.2023 21:16

Excellent work

Ответить
@javierrenteria3195
@javierrenteria3195 - 30.08.2023 21:36

can you share us the repo? thanks

Ответить
@liammax7289
@liammax7289 - 27.08.2023 09:53

Can you givr us a tutorial for the new seeding please ?

Ответить
@Katie-hb8iq
@Katie-hb8iq - 17.08.2023 19:21

Why on earth would they change this and not update their documentation? They just say, "Make sure to create a database config file and give it the path" and that's gotta be as vague as humanly possible.

Ответить
@MrDiGrayMan
@MrDiGrayMan - 08.08.2023 19:53

I've spent hours reading nest js and typeorm docs, and finaly found this video. Eveything works perfect, thank you!

Ответить
@sriharsha186
@sriharsha186 - 27.07.2023 18:31

Everyone who gets this warning:'No changes in database schema were found - cannot generate a migration. To create a new empty migration use "typeorm migration:create" command' - This is either because you did not have Entity() decorator or because the table already exists in the DB. Remember, in the video, the table was first deleted before the command to run migrations was run

Ответить
@ICOReviewtoken
@ICOReviewtoken - 18.07.2023 13:02

please give me source github bro

Ответить
@souleymanetoure670
@souleymanetoure670 - 13.07.2023 22:37

You are amazing !

Ответить
@ongo9977
@ongo9977 - 16.06.2023 04:42

how to read database config from env file

Ответить
@konopatbli
@konopatbli - 03.06.2023 16:24

I spent three days with the documentation to no avail. I should have gone here first. Thanks!!!

Ответить
@spoodermen2530
@spoodermen2530 - 03.06.2023 16:13

thanks! worked well for me.

Ответить
@avivlevinson6245
@avivlevinson6245 - 27.05.2023 22:43

Thank you very much!
In the newer versions of TypeORM, the @EntityRepository() decorator has been deprecated.
any idea how to solve that ?

Ответить
@code-island
@code-island - 25.05.2023 22:01

Very Good Content

Ответить
@the0FFH
@the0FFH - 17.05.2023 18:59

Thanks!!

Ответить
@killxflip8547
@killxflip8547 - 13.05.2023 17:15

Everyone who gets this warning:'No changes in database schema were found - cannot generate a migration. To create a new empty migration use "typeorm migration:create" command', add the @Entity() docorator to your entity class

Ответить
@joaovitor-mc5co
@joaovitor-mc5co - 11.05.2023 06:12

Thanks for the explanation, this perfectly resolve my problem with migrations in the TypeORM.

Ответить
@adesegunadebayo
@adesegunadebayo - 30.04.2023 18:08

I have been pulling my hair with the breaking changes from typeorm >= 0.3 versions, I'll update this thread if it comes out successful!

Ответить
@cesarkohl
@cesarkohl - 29.04.2023 17:32

TYVM!

Ответить
@user-hp6jb9qj2t
@user-hp6jb9qj2t - 21.04.2023 04:13

which vs-code theme are you using? it looks awesome!

Ответить
@saif_haq_
@saif_haq_ - 17.04.2023 12:37

"No changes in database schema were found - cannot generate a migration. To create a new empty migration use "typeorm migration:create" command"

Please tell how to solve this.......... the only difference in my code is that i'm using Postgres and i've used graphql instead of rest
api

Ответить
@jesuscordoba1117
@jesuscordoba1117 - 11.04.2023 15:31

Thank you very much, very useful and worked perfectly.

Ответить
@rudeadyet1992
@rudeadyet1992 - 02.04.2023 03:30

Thanks very useful. Also, what about Seeding? Is it the same as of you old tutorial.

Ответить
@EzequielBinker
@EzequielBinker - 27.03.2023 22:04

"No changes in database schema were found - cannot generate a migration" issue. Did anyone solve this ? I'm using typeorm 0.3. Thanks

Ответить
@user-zw1wi2ri6w
@user-zw1wi2ri6w - 25.03.2023 10:43

Very Helpful. What is the exact version of typeorm you are using in this video?

Ответить
@djaos-8326
@djaos-8326 - 24.03.2023 08:52

This work for postgresql?

Ответить
@olgabaeva727
@olgabaeva727 - 22.03.2023 20:59

+1 for the "No changes in database schema were found - cannot generate a migration. To create a new empty migration use "typeorm migration:create" command" error ((

Ответить
@ivocosta7281
@ivocosta7281 - 14.03.2023 13:27

​ @Amitav Roy I am getting an error, when i run the migrations. It says there are no migrations to run, even though there are pending scripts in the DB.

Can you please share the repo link for this codebase

Ответить
@golu8045
@golu8045 - 12.03.2023 14:04

Hello sir, can you share a github repo link of this code? because I am getting an error "No changes in database schema were found - cannot generate a migration. To create a new empty migration use "typeorm migration:create" command" or please make a video how to solve this issue

Ответить
@matheusrehbein4234
@matheusrehbein4234 - 25.02.2023 21:03

nice thanks... please add in the playlist

Ответить
@nicolagabriel8520
@nicolagabriel8520 - 15.02.2023 20:10

How about if i want to use config service for env when creating a datasource?

Ответить
@crescini.adrian
@crescini.adrian - 14.02.2023 01:51

Crack +10

Ответить
@sarunmrzn
@sarunmrzn - 07.02.2023 15:23

Can you inject the config service to datasource for env vars? I can only get it working with dotenv package, it'd be nice if there was a workaround by using config service itself

Ответить
@YonatanVigilioUsa
@YonatanVigilioUsa - 02.02.2023 09:02

No changes in database schema were found - cannot generate a migration. To create a new empty migration use "typeorm migration:create" command.

Ответить
@eunjikim2u
@eunjikim2u - 30.01.2023 15:26

You saved me too!!! Thank you so much! You are genius!!! LOL

Ответить
@user-ez4wj3up2o
@user-ez4wj3up2o - 26.01.2023 22:54

This is a great guide.
I spent a lot of time setting up migrations.
like, share, subscribe

Ответить
@sadamhussain5009
@sadamhussain5009 - 21.01.2023 09:32

Great Video We are facing
No changes in database schema were found - cannot generate a migration. To create a new empty migration use "typeorm migration:create" command

Ответить