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

[BUG]: createTable() method concats 'default' value #14797

Closed
Jeckerson opened this issue Jan 31, 2020 · 1 comment
Closed

[BUG]: createTable() method concats 'default' value #14797

Jeckerson opened this issue Jan 31, 2020 · 1 comment
Assignees
Labels
bug A bug report status: medium Medium

Comments

@Jeckerson
Copy link
Member

Describe the bug
During creation of the table via createTable() method and specifying column with default value like that

'default' => 'CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP',

It concatenates until first space and create column like with

["_default":protected]=>
    string(17) "CURRENT_TIMESTAMP"

Steps to reproduce the behaviour:

$this->db->createTable('test', 'db_name', [
            'columns' => [
                new Column('column_timestamp_default', [
                    'type' => Column::TYPE_TIMESTAMP,
                    'default' => 'CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP',
                ]),
            ],
        ]);

Expected behavior

Create column as it is specified originally.

Details

  • Phalcon version: 4.0.x
  • PHP Version: 7.2
  • Operating System: Ubuntu
  • Installation type: installing via package manager
@Jeckerson Jeckerson added bug A bug report status: unverified Unverified labels Jan 31, 2020
Jeckerson added a commit that referenced this issue Jan 31, 2020
@Jeckerson Jeckerson self-assigned this Jan 31, 2020
@Jeckerson Jeckerson added status: medium Medium and removed status: unverified Unverified labels Jan 31, 2020
Jeckerson added a commit that referenced this issue Feb 1, 2020
@Jeckerson
Copy link
Member Author

Fixed in #14798

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug report status: medium Medium
Projects
Archived in project
Development

No branches or pull requests

1 participant