Page MenuHomePhabricator

Support AUTO_INCREMENT in `bin/storage adjust`
ClosedPublic

Authored by epriestley on Sep 29 2014, 7:17 PM.
Tags
None
Referenced Files
F15484488: D10607.id25477.diff
Wed, Apr 9, 6:32 PM
F15426089: D10607.id25477.diff
Sun, Mar 23, 7:00 AM
F15418057: D10607.diff
Thu, Mar 20, 8:29 PM
F15403293: D10607.diff
Tue, Mar 18, 2:39 AM
F15392668: D10607.id25477.diff
Sat, Mar 15, 4:45 PM
F15369456: D10607.id25477.diff
Wed, Mar 12, 6:49 AM
F15323699: D10607.id25477.diff
Mar 7 2025, 12:48 AM
F15285103: D10607.diff
Mar 4 2025, 11:35 AM
Subscribers

Details

Summary

Ref T1191. When changing the column type of an AUTO_INCREMENT column, we currently may lose the autoincrement attribute.

Instead, support it. This is a bit messy because AUTO_INCREMENT columns interact with PRIMARY KEY columns (tables may only have one AUTO_INCREMENT column, and it must be a primary key). We need to migrate in more phases to avoid this issue.

Introduce new auto and auto64 types to represent autoincrement IDs.

Test Plan
  • Saw autoincrement show up correctly in web UI.
  • Fixed an autoincrement issue on the XHProf storage table with bin/storage adjust safely.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Support AUTO_INCREMENT in `bin/storage adjust`.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: btrahan.
btrahan edited edge metadata.
This revision is now accepted and ready to land.Sep 30 2014, 5:08 PM
This revision was automatically updated to reflect the committed changes.