[Webkit-unassigned] [Bug 137154] IndexedDB is deleting data when a PK is shared amongst two objectStores
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Oct 30 09:32:27 PDT 2014
https://bugs.webkit.org/show_bug.cgi?id=137154
--- Comment #3 from Brady Eidson <beidson at apple.com> ---
The problem is the schema:
"CREATE TABLE Records (objectStoreID INTEGER NOT NULL ON CONFLICT FAIL, key TEXT COLLATE IDBKEY NOT NULL ON CONFLICT FAIL UNIQUE ON CONFLICT REPLACE, value NOT NULL ON CONFLICT FAIL)"));
Which needs to be:
"CREATE TABLE Records (objectStoreID INTEGER NOT NULL ON CONFLICT FAIL, key TEXT COLLATE IDBKEY NOT NULL ON CONFLICT FAIL, value NOT NULL ON CONFLICT FAIL)"));
With the addition of an index to make objectstore/key pairs unique:
"CREATE UNIQUE INDEX IF NOT EXISTS RecordsIndex ON Records (objectStoreID, key);"
That in itself is straightforward. Unfortunately since the bad schema is out there, we also need a migration path.
That was a little weird to get right, but I have now gotten it right. Patch forthcoming.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20141030/da5b9244/attachment-0002.html>
More information about the webkit-unassigned
mailing list