You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Will there be auto-migrations generator like in DoctrineMigrations? #403
This is must-have feature and I plan to do it. However right now there so many other issues needs to be resolved, my hands just didnt touch this part yet.
basic migration generation functionality is landed since 0.1.0-alpha.17. It has some features missing plus it do not generate sql for down method yet. Start testing it 🏭 Use migrations:generate command to generate migration.
@pleerock Awesome work !
I tried migrations:generate in 0.1.0-alpha-19. Migration script contains all what is needed to update/add/remove columns, but he does not have anything about creating missing table.
@GuillaumeNury hmm thats strange, are you sure about it? It should create schema for new entities as well. Maybe you forgot to specify your entities in orm configuration?
@pleerock Sorry for popping this issue up but question is still remain for me.
Can we somehow collect all synching queries and write them to some file?
For now the only way I see to write custom logger and define method logQuery but filter those which are SELECT/DELETE/UPDATE. Is there better way to do it?
Activity
pleerock commentedon Apr 13, 2017
This is must-have feature and I plan to do it. However right now there so many other issues needs to be resolved, my hands just didnt touch this part yet.
idchlife commentedon Apr 13, 2017
@pleerock got it, thanks!
pleerock commentedon Jun 19, 2017
basic migration generation functionality is landed since
0.1.0-alpha.17. It has some features missing plus it do not generate sql fordownmethod yet. Start testing it 🏭 Usemigrations:generatecommand to generate migration.GuillaumeNury commentedon Jun 22, 2017
@pleerock Awesome work !
I tried
migrations:generatein0.1.0-alpha-19. Migration script contains all what is needed to update/add/remove columns, but he does not have anything about creating missing table.vance commentedon Jul 19, 2017
Any good way to configure it with naming strategy?
pleerock commentedon Jul 21, 2017
@GuillaumeNury hmm thats strange, are you sure about it? It should create schema for new entities as well. Maybe you forgot to specify your entities in orm configuration?
@vance what do you mean?
ddyrcz commentedon Aug 13, 2017
Is there any instruction how to use the
migrations:generatecommand?yoz commentedon Jan 23, 2018
@vance maybe see #1482?
AlexMesser commentedon Feb 28, 2018
fixed and released in
[email protected]. You can try it vianpm i typeorm@next.LogansUA commentedon Aug 3, 2018
@pleerock Sorry for popping this issue up but question is still remain for me.
Can we somehow collect all synching queries and write them to some file?
For now the only way I see to write custom logger and define method
logQuerybut filter those which areSELECT/DELETE/UPDATE. Is there better way to do it?pleerock commentedon Aug 4, 2018
yes we can, there is a migration:generate command that you can use, see CLI documentation.