I have the following table:
CREATE TABLE IF NOT EXISTS tab_gas_card (
id INT(11) NOT NULL AUTO_INCREMENT,
vehicle_id INT(11) NOT NULL,
folio VARCHAR(8) NOT NULL,
nip VARCHAR(4) NOT NULL,
date date NOT NULL,
cost DOUBLE NOT NULL,
amount DOUBLE DEFAULT 0,
active BIT(1) NOT NULL DEFAULT 0.00,
PRIMARY KEY (id),
CONSTRAINT fk_gas_card_tab_vehicle_id FOREIGN KEY (vehicle_id)
REFERENCES tab_vehicle (id)
) ENGINE = InnoDB DEFAULT CHARACTER SET = utf8;
and I want the amount field to default to an initial value of 0, but just as I have my code, it only generates a NULL, how could I solve this?