When writing a codeigniter migration, I am not sure how to go about adding a field of the decimal type. specifically, how do you define the size of the element that is allowed? For example, how would I define the array to pass to dbforge->add_field()
in order to create a field like the following:
price decimal(10,2) not null default 0.00
'price' => array(
'type' => 'DECIMAL',
'constraint' => '10,2',
),
'price' => array(
'type' => 'DECIMAL',
'constraint' => '10,2',
'null' => FALSE,
'default' => 0.00
),
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With