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.
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.
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. Maybecreate_sequence
,drop_sequence
, andsequence_name
are not needed anymore, andnextId
has to be changed to the new sequence table, or to work without sequence table. MaybeAUTOINCREMENT
is needed, because AI works ifPRIMARY KEY
is present, too. MaybeAUTOINCREMENT
is obsolet, because the field has to bePRIMARY KEY
to selectAUTOINCREMENT
.