I have a table which I was trying to change the columns to. For some reason, mysql will not change the column from a varchar to a char type.
Table:
When I do (in mysql console or PHP):
neither will change the column type to char; both columns remain as a varchar. It is doing something though, as if I change the default value in the first alter table statement, the new default gets set.
At first I thought it was because of the unique setting but it does this on both fields.
I'm using mysql 4.0.24. Does anyone know why I can't change these two column types? I have tested numeric types (i.e. bigint -> int) with alter tables and it works correctly ??
Table:
Code:
TABLE test {
fld1 varchar(20) not null unique
fld2 varchar(30) not null default 'default'
fld3 int(10) not null default 5
}
When I do (in mysql console or PHP):
Code:
ALTER TABLE `test` CHANGE `fld2` `fld2` CHAR(30) DEFAULT 'default' NOT NULL;
ALTER TABLE `test` CHANGE `fld1` `fld1` CHAR(20) NOT NULL
neither will change the column type to char; both columns remain as a varchar. It is doing something though, as if I change the default value in the first alter table statement, the new default gets set.
At first I thought it was because of the unique setting but it does this on both fields.
I'm using mysql 4.0.24. Does anyone know why I can't change these two column types? I have tested numeric types (i.e. bigint -> int) with alter tables and it works correctly ??