StartupAPI / users

:zap: User management tool to be used in on-line projects. Includes admin dashboard.
http://www.StartupAPI.com/
MIT License
60 stars 24 forks source link

dbupgrade error #236

Open alexdruk opened 8 years ago

alexdruk commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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