Skip to content

sql_mode error during "php artisan migrate" #2

@jonesluster

Description

@jonesluster

Received this error. Looks like this code was written in a style that is no longer allowed by MySQL.

[Exception]
SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'creat
ed_at' (SQL: create table users (id int unsigned not null auto_increment primary key
, name varchar(32) not null, username varchar(32) not null, email varchar(320) not
null, password varchar(64) not null, created_at timestamp default 0 not null, upda ted_at timestamp default 0 not null) default character set utf8 collate utf8_unicode_ci
) (Bindings: array (
))

There appear to be some workarounds, but it would be nice to have this very good example source updated.

Best regards,

Kevin

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions