mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 09:28:54 +00:00
Remove default timestamp to fix strict error (#1720)
This commit is contained in:
parent
2482176d90
commit
12922a89cc
2 changed files with 3 additions and 3 deletions
|
|
@ -12,9 +12,9 @@ func Up_20161118212641(tx *sql.Tx) error {
|
|||
_, err := tx.Exec(
|
||||
"CREATE TABLE `password_reset_requests` (" +
|
||||
"`id` int(10) unsigned NOT NULL AUTO_INCREMENT," +
|
||||
"`expires_at` timestamp NOT NULL," +
|
||||
"`created_at` timestamp DEFAULT CURRENT_TIMESTAMP," +
|
||||
"`updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP," +
|
||||
"`expires_at` timestamp NOT NULL DEFAULT '1970-01-01 00:00:01'," +
|
||||
"`user_id` int(10) unsigned NOT NULL," +
|
||||
"`token` varchar(1024) NOT NULL," +
|
||||
"PRIMARY KEY (`id`)" +
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ import (
|
|||
func (d *Datastore) NewPasswordResetRequest(req *kolide.PasswordResetRequest) (*kolide.PasswordResetRequest, error) {
|
||||
sqlStatement := `
|
||||
INSERT INTO password_reset_requests
|
||||
( user_id, token)
|
||||
VALUES (?,?)
|
||||
( user_id, token, expires_at)
|
||||
VALUES (?,?, NOW())
|
||||
`
|
||||
response, err := d.db.Exec(sqlStatement, req.UserID, req.Token)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Reference in a new issue