Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

[email protected] unclear release documentation about migrations dir

I recently moved from [email protected] to version 0.3 and there is this sentence on the docs of the release: https://github.com/typeorm/typeorm/releases/tag/0.3.0 that doesn't make much sense to me (under the section of DEPRECATED):

entities, migrations, subscribers options inside DataSourceOptions accepting string directories support is deprecated. You'll be only able to pass entity references in the future versions.

From this I get that we now must specify the entities and can not use (or better said, won't be able to use in the future) wildcard paths i.e. entities: ['dist/**/*.entity.{ts,js}'] instead we must use: entities: [User, AnoherEntity...]

but does this apply for migrations too? I find it confusing because migrations are generated by the cli of typeorm, meaning we must generate the migration i.e. 1652169197705-SomeMigration and then add that file name with its full path into the DataSource's migrations? migrations: ['1652169197705-SomeMigration'...]

Thanks!

like image 526
tevvek Avatar asked Dec 20 '25 05:12

tevvek


1 Answers

Yes it does :)

I agree the documentation is in need of some serious love and old examples have been updated but their readmes have not - this is causing some significant confusion.

like image 164
James Claridge Avatar answered Dec 24 '25 10:12

James Claridge



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!