Welcome Guest, Not a member yet? Register   Sign In
Issue modifying column using dbforge
#4

(07-02-2015, 01:49 PM)mwhitney Wrote:
Quote:ALTER TABLE `example_table` CHANGE `FOO` `BAR` varchar(15) NOT NULL, CHANGE `FOO` `FOO` varchar(20) NULL

The MySQL documentation is not very clear on when it is possible to change both the name and type of the column, so it is usually done as two separate operations. The error seems to indicate that you were trying to change "Foo varchar(15) NOT NULL" into "BAR varchar(20) NULL", and it would appear that dbforge butchered the reversed the order of the operations, or should have used the new name when changing the definition of the column.

However, that's not really clear from the code you supplied, and certainly doesn't match the print_r output you pasted.

Hmm, you may be right, ill give it a shot at modifying the type first, then renaming it.

Thanks!
Reply


Messages In This Thread
Issue modifying column using dbforge - by jLinux - 07-01-2015, 11:09 PM
RE: Issue modifying column using dbforge - by jLinux - 07-02-2015, 02:43 PM



Theme © iAndrew 2016 - Forum software by © MyBB