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

Migration snapshot not working on decimal with zero scale #500

Closed
1 of 3 tasks
kgbph opened this issue Jun 17, 2021 · 0 comments · Fixed by #562
Closed
1 of 3 tasks

Migration snapshot not working on decimal with zero scale #500

kgbph opened this issue Jun 17, 2021 · 0 comments · Fixed by #562
Labels

Comments

@kgbph
Copy link

kgbph commented Jun 17, 2021

This is a (multiple allowed):

  • bug

  • enhancement

  • feature-discussion (RFC)

  • CakePHP Version: 4.2.7

  • Migrations plugin version: 3.1.0

  • Database server (MySQL, SQLite, Postgres): MySQL 5.6

  • PHP Version: 7.4

  • Platform / OS: Docker container php:7.4-fpm

What you did

Execute bin/cake bake migration_snapshot Initial against a database with DECIMAL (11, 0) field.

Expected Behavior

->addColumn('price', 'decimal', [
    'default' => null,
    'precision' => 11,
    'scale' => 0,
    'null' => false,
])

Actual Behavior

->addColumn('price', 'decimal', [
    'default' => null,
    'limit' => 11,
    'null' => false,
])

Related

#310
#168

@markstory markstory added the bug label Jun 20, 2021
ajibarra added a commit to CakeDC/cakephp-migrations that referenced this issue Sep 16, 2022
markstory added a commit that referenced this issue Sep 25, 2022
Fixes #500 . If precision is 0 command adds it anyway.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants