[tahoe-lafs-trac-stream] [tahoe-lafs] #1864: turn off the AUTOINCREMENT feature in our use of sqlite?
tahoe-lafs
trac at tahoe-lafs.org
Thu Nov 29 21:13:29 UTC 2012
#1864: turn off the AUTOINCREMENT feature in our use of sqlite?
------------------------------+-----------------------------------------
Reporter: zooko | Owner: warner
Type: enhancement | Status: new
Priority: normal | Milestone: undecided
Component: code-storage | Version: 1.9.2
Resolution: | Keywords: sqlite design-review-needed
Launchpad Bug: |
------------------------------+-----------------------------------------
Comment (by davidsarah):
Replying to [comment:4 zooko]:
> > (Because we never delete a row without also deleting or updating all
other references to it. Right?)
>
> Oh, in fact if we use foreign key constraints then sqlite will enforce
that we never do this, right?
Yes, within the database. IIUC, with foreign key integrity checking turned
on ([https://github.com/davidsarah/tahoe-
lafs/blob/1818-leasedb/src/allmydata/util/dbutil.py#L30 which it is]),
AUTOINCREMENT would only be useful if you were persistently storing the
integer primary keys outside the db (which we are not).
--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/1864#comment:5>
tahoe-lafs <https://tahoe-lafs.org>
secure decentralized storage
More information about the tahoe-lafs-trac-stream
mailing list