Hello,
I'm trying to add a price column to an existing table
class ProductInstaller extends ...
// Previous migrations
function up_3()
{
$this->addColumn ('products', "
price decimal(6,2)
");
}
// More migration code...
I ran the migration and the price column was added as a decimal type,but the (6,2) condition didn't pass. Am I missing a set of parentheses or something?
Pardon my noobness.
Thanks,
try with
price decimal(6.2)
i think you must take the float datatype instead of the decimal datatype. So it works for me.
price float 10.2
1 to 7 of 7