Closed Bug 619016 Opened 15 years ago Closed 15 years ago

Make SQLite installations able to upgrade

Categories

(Bugzilla :: Database, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
Bugzilla 4.2

People

(Reporter: mkanat, Assigned: mkanat)

Details

Attachments

(2 files, 2 obsolete files)

Right now, SQLite is missing all of its schema-altering code for upgrades. We need to implement bz_alter_colum, bz_add_column, bz_rename_column, all of the FK-adding/altering stuff, and anything else involved in an upgrade.
Priority: -- → P1
Attached patch Work In Progress (obsolete) — Splinter Review
Here's a WIP, with an implementation of bz_alter_column.
Assignee: database → mkanat
Status: NEW → ASSIGNED
Attached patch WIP 2 (obsolete) — Splinter Review
Here's an update ALTER implementation that supports $set_nulls_to and uses transactions (thanks to glob who found out that SQLite supports transactional DDL).
Attachment #497455 - Attachment is obsolete: true
Attached patch v1Splinter Review
Okay, here we go! Technically I don't need review on this, since I'm the DB module owner, but I thought it might be nice to get some outside input in case there's anything that I could be doing better, etc. (Particularly since you already made some good suggestions to me in IRC yesterday.)
Attachment #497457 - Attachment is obsolete: true
Attachment #497642 - Flags: review?(glob)
Comment on attachment 497642 [details] [diff] [review] v1 Okay, I'm going to check this patch in as-is, so that I can continue to do development and testing related to SQLite (including setting up some tinderboxen) but I'd still like a review, and I can update the patch after it's been checked in.
Attachment #497642 - Flags: review+
Flags: approval+
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/trunk/ modified Bugzilla/DB/Schema.pm modified Bugzilla/DB/Schema/Sqlite.pm Committed revision 7622.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Okay, there's a bug in the above patch when adding foreign keys to tables that don't have any foreign keys. I have a fix and will attach it here.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attached patch Fix FK code, v1Splinter Review
Attachment #497911 - Flags: review+
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/trunk/ modified Bugzilla/DB/Schema/Sqlite.pm Committed revision 7623.
Status: REOPENED → RESOLVED
Closed: 15 years ago15 years ago
Resolution: --- → FIXED
And a bustage fix for _set_nulls_sql: Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/trunk/ modified Bugzilla/DB/Schema.pm Committed revision 7625.
Comment on attachment 497642 [details] [diff] [review] v1 This has been checked in for a while, so I'm assuming it's just not going to be a priority for glob to review, and it seems likely that review would just pass, given that things seem to have been working fine on trunk for a while.
Attachment #497642 - Flags: review?(glob)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: