I am working on the schema for my Symfony app, and I need to set the default value of two boolean fields to false. However, with all the ways I've tried to do it, when the sql gets generated, it comes out with the default keyword, but no default value after it.
my last attempt was:
negotiable:
type: bool
default: "false"
complete:
type: bool
default: "false"
but I have also tried default: false
, default: 'false'
, default: 0
since false is just an alias for 0 in MySQL, and default: '0'
Failing Query:
CREATE TABLE dormcode_project (id BIGINT AUTO_INCREMENT, client_id BIGINT, title VARCHAR(255), briefdesc LONGTEXT, spec LONGTEXT, coder_id BIGINT, paytype VARCHAR(30), negotiable bool DEFAULT , complete bool DEFAULT , created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, INDEX coder_id_idx (coder_id), INDEX client_id_idx (client_id), PRIMARY KEY(id)) ENGINE = INNODB
Notice negotiable bool DEFAULT , complete bool DEFAULT ,
The file I've been playing with is the /config/doctrine/schema.yml
file. I'm kind of new to symfony/doctrine. I think this is the right one, but I guess I could be wrong. I do symfony cc
between each attempt to insert the sql to make sure that it didn't cache the schema. But it almost seems like its not using the file I've been changing...