jepiqueau / vue-typeorm-app

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

WIP Use TypeORM migrations #1

Closed nirajhinge closed 3 years ago

nirajhinge commented 3 years ago

I have tried to use the migrations instead of synchronize flag but for some reason it doesn't seem to run the migrations and only creates the migrations table. Here is the output I get:

⚡️ To Native -> CapacitorSQLite createConnection 83025927 databaseName: ionic-vue-db-itemsSQLite.db database path /Users/nirpan/Library/Developer/CoreSimulator/Devices/C2E05CA1-F439-4B07-B511-6215BA2ECF25/data/Containers/Data/Application/B9E79142-7D07-4B4F-BA68-BE2F6A365292/Documents/ionic-vue-db-itemsSQLite.db ⚡️ WebView loaded ⚡️ TO JS undefined ⚡️ To Native -> CapacitorSQLite open 83025928 ⚡️ TO JS undefined ⚡️ To Native -> CapacitorSQLite execute 83025929 ⚡️ TO JS {"changes":{"changes":0}} ⚡️ [info] - query: SELECT FROM "sqlite_master" WHERE "type" = 'table' AND "name" = 'migrations' ⚡️ To Native -> CapacitorSQLite query 83025930 ⚡️ TO JS {"values":[]} ⚡️ [info] - query: CREATE TABLE "migrations" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "timestamp" bigint NOT NULL, "name" varchar NOT NULL) ⚡️ To Native -> CapacitorSQLite execute 83025931 ⚡️ TO JS {"changes":{"changes":0}} ⚡️ To Native -> CapacitorSQLite query 83025932 ⚡️ [info] - query: SELECT FROM "migrations" "migrations" ORDER BY "id" DESC ⚡️ TO JS {"values":[]} ⚡️ To Native -> CapacitorSQLite close 83025933 ⚡️ TO JS undefined