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

Column alter/modify with CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP not working #14880

Closed
maurobpt opened this issue Feb 27, 2020 · 1 comment · Fixed by #14881
Closed
Assignees
Labels
bug A bug report status: medium Medium

Comments

@maurobpt
Copy link

I was trying to generate a migrations with timestamp columns and one of my columns cannot execute the migration for column updated_at

new Column(
                        'created_at',
                        [
                            'type' => Column::TYPE_TIMESTAMP,
                            'default' => "CURRENT_TIMESTAMP",
                            'notNull' => true,
                            'after' => 'deleted_user_id'
                        ]
                    ),
                    new Column(
                        'updated_at',
                        [
                            'type' => Column::TYPE_TIMESTAMP,
                            'default' => "CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP",
                            'notNull' => false,
                            'after' => 'created_at'
                        ]
                    ),
                    new Column(
                        'deleted_at',
                        [
                            'type' => Column::TYPE_TIMESTAMP,
                            'notNull' => false,
                            'after' => 'updated_at'
                        ]
                    )
@Jeckerson Jeckerson transferred this issue from phalcon/migrations Feb 27, 2020
@Jeckerson Jeckerson changed the title migrations - CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP not working Column alter/modify with CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP not working Feb 27, 2020
@Jeckerson Jeckerson self-assigned this Feb 27, 2020
@Jeckerson Jeckerson added 4.0.5 bug A bug report status: medium Medium labels Feb 27, 2020
Jeckerson added a commit that referenced this issue Feb 27, 2020
Jeckerson added a commit that referenced this issue Feb 27, 2020
@Jeckerson Jeckerson linked a pull request Feb 27, 2020 that will close this issue
5 tasks
Jeckerson added a commit that referenced this issue Feb 27, 2020
@Jeckerson
Copy link
Member

Fixed in #14881

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

Successfully merging a pull request may close this issue.

2 participants