Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3439862
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T08:21:45+00:00 2026-05-18T08:21:45+00:00

I am working on the schema for my Symfony app, and I need to

  • 0

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…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T08:21:45+00:00Added an answer on May 18, 2026 at 8:21 am

    Boolean is a synonym for TINYINT. Use integer(1) instead and set your default to 0/1.

    Sources:

    http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html

    http://www.symfony-project.org/doctrine/1_2/en/04-Schema-Files

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working with an existing database schema, and trying to setup two Doctrine models
In one of the tables in the schema I am working on, I need
I'm working on mysql and have two tables with the same schema: preTrial |id|accusedId|articleid|
I'm working on a a database schema to store geospatial datas, I need to
I'm working on scripts that apply database schema updates. I've setup all my SQL
I'm working on a project with symfony 1.4 & doctrine. 1.2 In my schema.yml
I'm working on converting a rather large (but somewhat simple) app from Symfony to
I'm working on an XML Schema which is going to be used for data
I'm currently working with an XML Schema that has <xsd:annotation> / <xsd:documentation> on most
I am working on a database schema, and am trying to make some decisions

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.