react-native-db-models icon indicating copy to clipboard operation
react-native-db-models copied to clipboard

erase_db() doesn't reset increment

Open puredazzle opened this issue 9 years ago • 3 comments
trafficstars

Hello! Shouldn't erase_db() reset the autoIncrement also?

puredazzle avatar Mar 31 '16 12:03 puredazzle

@puredazzle erase_db() working for you???

waleedarshad-vf avatar Jul 26 '16 11:07 waleedarshad-vf

It did when I tested 4 months ago. Haven't used react native or the plugin since.

puredazzle avatar Jul 27 '16 15:07 puredazzle

Looking at the code, it appears erase_db is meant to be taken as "erase the data in the DB" rather than "erase the database itself." So I would say it's not meant to reset the autoinc. If it erased the db, then you'd have to create the db all over again before adding anything. That would be something you'd expect the autoinc to go back to 0 for.

kylegoetz avatar Oct 30 '17 03:10 kylegoetz