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

dbupgrade error #236

Open
alexdruk opened this issue Jul 27, 2016 · 2 comments
Open

dbupgrade error #236

alexdruk opened this issue Jul 27, 2016 · 2 comments

Comments

@alexdruk
Copy link
Contributor

alexdruk commented Jul 27, 2016

from make:
Upgrading from v.1 to v.35

[ERR] Caught exception: Can't execute query: Invalid default value for 'last_accessed'
make[1]: *** [updatedb] Error 1
make: *** [updateusers] Error 2

MySQL version 5.7.9

the error when executing
$versions[2]['up'][] = 'ALTER TABLE u_users ADD last_accessed TIMESTAMP';

Proposed: change line 758 of dbupgrade.php from
$versions[2]['up'][] = 'ALTER TABLE u_users ADD last_accessed TIMESTAMP';
to
$versions[2]['up'][] = 'ALTER TABLE u_users ADD last_accessed TIMESTAMP DEFAULT CURRENT_TIMESTAMP';

@sergeychernyshev
Copy link
Member

There are a few other TIMESTAMP fields that are set to DEFAULT NULL and need to be fixed as well.

Also it seems that most of them should be replaced with DATETIME type and that requires adding new version.

@sergeychernyshev
Copy link
Member

Please fork the project, make a change and submit a pull request.

alexdruk added a commit to alexdruk/users that referenced this issue Jul 31, 2016
sergeychernyshev pushed a commit that referenced this issue Aug 11, 2016
fixing dbupgrade.php, issue #236
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants