Homec4science

Support AUTO_INCREMENT in `bin/storage adjust`

Authored by epriestley <git@epriestley.com> on Oct 1 2014, 17:24.

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

Committed
epriestley <git@epriestley.com>Oct 1 2014, 17:24
Pushed
aubortJan 31 2017, 17:16
Parents
rPH0d7489da79bc: Provide `bin/storage quickstart` to automate generation of `quickstart.sql`
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH300172e79991: Support AUTO_INCREMENT in `bin/storage adjust` (authored by epriestley <git@epriestley.com>).Oct 1 2014, 17:24