Last active
March 31, 2017 21:26
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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