Thursday 15 September 2011

mysql - #1067 - Invalid default value for 'remember_token' -



mysql - #1067 - Invalid default value for 'remember_token' -

in lynda tutorial "up , running laravel", sample app (authapp) created, allowing user log in.

here construction of create_user migration:

public function up() { schema::create('users', function($newtable) { $newtable->increments('id'); $newtable->string('email')->unique(); $newtable->string('username',100)->unique(); $newtable->string('password',50); $newtable->string('remember_token',100); $newtable->timestamps(); }); }

and here corresponding view file excerpt:

{{ form::open(array('url'=>'register')) }} {{ form::label('email', 'email address') }} {{ form::text('email') }} {{ form::label('username', 'username') }} {{ form::text('username') }} {{ form::label('password', 'password') }} {{ form::password('password') }} {{ form::submit('sign up')}} {{ form::close() }}

when saved , seek register in actual app, error: tutorial says it's because there no default value set remember_token variable , suggests go phpmyadmin set default value null.

however, when so, next error message:

consequently, cannot prepare error , proceed.

any thought on how deal situation?

in phpmyadmin, need check null checkbox well, allow null values in field.

it's barely cutoff on right side of screenshot.

mysql laravel phpmyadmin

No comments:

Post a Comment