phalcon / phalcon-devtools

Phalcon Developer Tools
https://docs.phalcon.io/latest/en/devtools
Other
1.33k stars 629 forks source link

double and length 1 #1399

Closed zak-wojtek77 closed 4 years ago

zak-wojtek77 commented 4 years ago

If I have table "test" with field type of "DOUBLE" and run command: vendor/bin/phalcon migration generate --table=test then is generate such file:

new Column(
                        'price',
                        [
                            'type' => Column::TYPE_DOUBLE,
                            'notNull' => true,
                            'size' => 1,
                            'after' => 'id'
                        ]
                    )

where size = 1

Next when I run command: vendor/bin/phalcon migration run --verbose I have error: ALTER TABLE test MODIFY price DOUBLE(1) NOT NULL AFTER idERROR: 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 ') NOT NULL AFTER id' at line 1

Details

Jeckerson commented 4 years ago

Fixed in 3.4.11