/* change row size of image URI columns */ alter table PROFILE_IMAGES_T modify RESOURCE_MAIN text; alter table PROFILE_IMAGES_T modify RESOURCE_THUMB text;
alter table PROFILE_IMAGES_EXTERNAL_T modify URL_MAIN text; alter table PROFILE_IMAGES_EXTERNAL_T modify URL_THUMB text;
Modify to
/* change row size of image URI columns */ alter table PROFILE_IMAGES_T modify RESOURCE_MAIN text not null; alter table PROFILE_IMAGES_T modify RESOURCE_THUMB text not null;
alter table PROFILE_IMAGES_EXTERNAL_T modify URL_MAIN text not null; alter table PROFILE_IMAGES_EXTERNAL_T modify URL_THUMB text;
2.7.x r97018, 2.7.2 r97019. The 2.7.1->2.7.2 conversion scripts were also added to 2.8.x (r97022)/2.8.1 (r97021). Trunk r96396 is included in these scripts as well.
Matthew Jones August 4, 2011 at 12:07 PM
I reopened this to fix the oracle conversion so that there are 2 separate alter statement. It doesn't seem like the "not null" clause is needed and causes a failure of the entire statement in oracle.
Matthew Jones July 29, 2011 at 3:14 PM
On Oracle in 2.7.1, the column is NOT NULL already, and trying to modify it to NOT NULL in a conversion causes "FAILURE: ORA-01442: column to be modified to NOT NULL is already NOT NULL", () which also prevents the size from being changed. Probably should either have 2 alters so the size change can succeed at least or remove the NOT NULL from Oracle.
Dunno why there was a null in mysql? Weird stuff, hibernate!
2.7.x (auto-generated)
profile_images_external_t.URL_MAIN not null
profile_images_t.RESOURCE_MAIN not null
profile_images_t.RESOURCE_THUMB not null
2.7.1 -> 2.7.x (converted)
profile_images_external_t.URL_MAIN null
profile_images_t.RESOURCE_MAIN null
profile_images_t.RESOURCE_THUMB null
2.7.2 conversion script (current)
/* change row size of image URI columns */
alter table PROFILE_IMAGES_T modify RESOURCE_MAIN text;
alter table PROFILE_IMAGES_T modify RESOURCE_THUMB text;
alter table PROFILE_IMAGES_EXTERNAL_T modify URL_MAIN text;
alter table PROFILE_IMAGES_EXTERNAL_T modify URL_THUMB text;
Modify to
/* change row size of image URI columns */
alter table PROFILE_IMAGES_T modify RESOURCE_MAIN text not null;
alter table PROFILE_IMAGES_T modify RESOURCE_THUMB text not null;
alter table PROFILE_IMAGES_EXTERNAL_T modify URL_MAIN text not null;
alter table PROFILE_IMAGES_EXTERNAL_T modify URL_THUMB text;