BradyNadeau / ionic-orm

Data-Mapper ORM for Ionic2, AngularJS, ( Hybrid Mobile Applications ), Supports WebSQL and SQLite databases. Currently in active development. - TypeORM Fork
https://typeorm.github.io
MIT License
48 stars 13 forks source link

AutoSync doesn't work #4

Open rdethurens opened 7 years ago

rdethurens commented 7 years ago

Hi, First, thanks a lot for your work. I'm experiencing a trouble with the "autoSchemaSync: true". It seems that it doesn't work nor in webBrowser nor on android Device. Each time i add a column i get this SQLError code : 5 /message : "could not prepare statement (1 no such column: EntityName.ColumnName)". I tried to use the ionic-orm test and it seems to have the same issue.

Any idea ?

Thanks in advance.

jase88 commented 7 years ago

Same here on websql

bolivir commented 7 years ago

Can confirm this problem (websql). If you change something on the schema, and then run you're app it will throw a sql object error. After wiping the DB the app wil run as expected.

This is a big problem when giving out updates where DB changes are required, are there any ways to it manually without the user losing his data?

rdethurens commented 7 years ago

Hi, I found a solution by changing some code. But i don't commit my changes to github. (I never do this so it will take time for me, and haven't yet). Hope, i work on it next week.

mo-ba commented 7 years ago

any progress? https://github.com/BradyLiles/ionic-orm/issues/14

rdethurens commented 7 years ago

I Update the component : Enable AutoSync On SQLite Enable AutoSync On WebWSql With issues : Always recreate Table / Just Add Column supported Not Update and Delete

available with npm instal ionic-orm3