pear / DB

http://pear.php.net/package/DB
9 stars 34 forks source link

Fix SQLite3 sequence handling #32

Open schengawegga opened 8 months ago

schengawegga commented 8 months ago

In SQLite3 sequence table created automatically and store AI informations for all tables in only one sequence table, if AUTOINCREMENT is selected in a table. Maybe create_sequence, drop_sequence, and sequence_name are not needed anymore, and nextId has to be changed to the new sequence table, or to work without sequence table. Maybe AUTOINCREMENT is needed, because AI works if PRIMARY KEY is present, too. Maybe AUTOINCREMENT is obsolet, because the field has to be PRIMARY KEY to select AUTOINCREMENT.

grafik

schengawegga commented 6 months ago

It is not a bug. SQLite works with AUTOINCREMENT and ROWID. As an alternative, PEAR\DB supports his own sequence solution. TODO: Check the correct behavior of the pear sequences.