jepiqueau / vue-typeorm-app

Vue App using TypeORM driver with @capacitor-community/sqlite
MIT License
10 stars 3 forks source link

How to generate migration files #4

Closed Akaori closed 3 years ago

Akaori commented 3 years ago

Hello @jepiqueau ,

I don't have much experience with TypeORM and Capacitor-Sqlite, but I really like this match. I was wondering how could you handle to generate the migration files on this example.

I made a test removing all migration files, creating my own entities files, and running typeorm migration:generate -n CreateDatabase, but I get the following error:

TypeORMError: No connection options were found in any orm configuration files.

How did you generate your migration files? Am I doing something wrong?

jepiqueau commented 3 years ago

@Akaori hi, I am not a specialist of typeorm. I did know that we can generate it automatically from the entity. So I generate them manually.

jepiqueau commented 3 years ago

@Akaori according to the doc https://github.com/typeorm/typeorm/docs/migrations.md you need to create a configuratio

Akaori commented 3 years ago

Hi @jepiqueau, thanks for answering me.

Using automatic generation didn't work for me, but getting all sql expressions from logs was enough to create it manually like you did.

Thank you for clarify how you did it.