HomePhorge

Support AUTO_INCREMENT in `bin/storage adjust`

Description

Support AUTO_INCREMENT in bin/storage adjust

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.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10607

Details

Provenance
epriestleyAuthored on Oct 1 2014, 8:24 AM
themackabuPushed on Mar 25 2025, 8:07 PM
Parents
rP0d7489da79bc: Provide `bin/storage quickstart` to automate generation of `quickstart.sql`
Branches
Unknown
Tags
Unknown

Event Timeline