Doctrine 1
  1. Doctrine 1
  2. DC-893

Using default value for bigint fields generates an error

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.2.3
    • Fix Version/s: None
    • Component/s: Record
    • Labels:
      None
    • Environment:
      Replicated on *nix using MySQL DB.

      Description

      A field defined as:
      'user_id' => array(
         'type' => 'bigint',
         'length' => 22,
         'default' => 0,
      ),

      Generates an error when create-tables is used:
      SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' [...] user_id bigint(22) DEFAULT , INDEX schedule_prize_id_idx (schedule_prize_id)[..]

      The default value is not accounted for.

        Activity

        Hide
        Paulo Vitor Reis added a comment -

        20 is the length of the mysql bigint..

        Show
        Paulo Vitor Reis added a comment - 20 is the length of the mysql bigint..

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Dan Osipov
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: