Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

double and length 1 #1399

Closed
zak-wojtek77 opened this issue Dec 16, 2019 · 1 comment
Closed

double and length 1 #1399

zak-wojtek77 opened this issue Dec 16, 2019 · 1 comment
Assignees
Milestone

Comments

@zak-wojtek77
Copy link

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

  • Phalcon Framework version: 3.4.1
  • phalcon-devtools version: 3.4.10
  • PHP Version: 7.2
  • Operating System: Linux
  • Server: Nginx
@Jeckerson Jeckerson self-assigned this Dec 16, 2019
@Jeckerson Jeckerson added this to the 3.4.x milestone Dec 16, 2019
@zak-wojtek77 zak-wojtek77 changed the title double and lenght 1 double and length 1 Dec 16, 2019
Jeckerson added a commit that referenced this issue Dec 21, 2019
Jeckerson added a commit to phalcon/migrations that referenced this issue Dec 21, 2019
Jeckerson added a commit that referenced this issue Dec 21, 2019
@Jeckerson Jeckerson mentioned this issue Dec 21, 2019
@Jeckerson
Copy link
Member

Fixed in 3.4.11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants