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
Closed
Assignees

Comments

@maurobpt
Copy link

@maurobpt maurobpt commented Feb 27, 2020

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 this to Working on it in Phalcon Roadmap Feb 27, 2020
Jeckerson added a commit that referenced this issue Feb 27, 2020
@Jeckerson Jeckerson mentioned this issue Feb 27, 2020
4 of 5 tasks complete
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 that will close this issue Feb 27, 2020
4 of 5 tasks complete
Jeckerson added a commit that referenced this issue Feb 27, 2020
…-timestamp

#14880 - Fix column default ON UPDATE
@Jeckerson

This comment has been minimized.

Copy link
Member

@Jeckerson Jeckerson commented Feb 27, 2020

Fixed in #14881

@Jeckerson Jeckerson closed this Feb 27, 2020
Phalcon Roadmap automation moved this from Working on it to Implemented Feb 27, 2020
@niden niden moved this from Implemented to Released in Phalcon Roadmap Mar 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Phalcon Roadmap
  
Released
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants
You can’t perform that action at this time.