Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@plfx
Last active March 31, 2017 21:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save plfx/fe25f892c1727dc392ef6ae35dae52cd to your computer and use it in GitHub Desktop.
Save plfx/fe25f892c1727dc392ef6ae35dae52cd to your computer and use it in GitHub Desktop.
Work-around for migration V4_0_3__Add_Index_To_Oauth_Code failure
-- Prior to UAA 1.5.2, the UAA schema would create the oauth_code.code column as
-- VARCHAR(256). A recent migration V4_0_3__Add_Index_To_Oauth_Code attempts to
-- add a unique index to this column to improve lookup speed, but the VARCHAR(256)
-- column in these long-lived UAA databases is too large for InnoDB to uniquely
-- index. If your deployment experiences failure in the UAA job when updating to
-- CF v255, this manual intervention should repair the UAA database by resizing
-- the column so that the migration can succeed on the next attempt.
DELETE FROM schema_version WHERE version = '4.0.3';
ALTER TABLE oauth_code MODIFY code VARCHAR(255);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment