dflourusso / expo-sqlite-orm

Expo SQLite ORM
132 stars 34 forks source link

Bug: AUTOINCREMENT is being forced on incompatible column type of primary key #50

Closed realjjaveweb closed 1 year ago

realjjaveweb commented 2 years ago

SQLite does not support AUTOINCREMENT on text columns, but _createTableColumns() code is always pushing NOT NULL PRIMARY KEY AUTOINCREMENT on primary key, of ANY type.

Settings autoincrement should have option to be disabled (I would keep turned on by default). Or automatically removed, when the column type is TEXT.

dflourusso commented 1 year ago

I'm currently working on the V2 for this project. There are many breaking changes, migrations and typescript support. If want try, here is the branch, and currently it's on the alpha 5 version.

This bug is simple to fix, I will try to fix it in the next week

Thank you for using this project and helping to make it better

dflourusso commented 1 year ago

Hello, V2 is live now. In V2 we have migrations, so you can create the tables and columns as you want.