#687 ✓resolved
ronin-11960 (at lighthouseapp)

AUTOINCREMENT should not be default for SQLite3 Serial type

Reported by ronin-11960 (at lighthouseapp) | December 2nd, 2008 @ 10:05 AM

With SQLite3, a field that is defined as INTEGER PRIMARY KEY is auto-populated during record creation. The presence or absence of the AUTOINCREMENT keyword only serves to determine which algorithm is used to generate the next value. According to the SQLite3 website, it's better to not use the AUTOINCREMENT keyword unless necessary for a particular design, as it causes more work for the database. I would submit that the default Serial type for SQLite3 should be INTEGER NOT NULL PRIMARY KEY. Here's a link for more info: http://www.sqlite.org/autoinc.html

Comments and changes to this ticket

  • Dan Kubb (dkubb)

    Dan Kubb (dkubb) December 3rd, 2008 @ 12:38 AM

    • State changed from “new” to “resolved”

    I have resolved this ticket with the following commit to dkubb/dm-core:


    Please note that the dkubb/dm-core is where most activity is happening, and only really critical patches are being made to sam/dm-core. When this branch is ready it will become the mainline and be distributed as the dm-core gem.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket