When create a column and set default value like this:
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
$table->string('username')->unique();
$table->string('email')->unique();
$table->string('password');
$table->string('api_token', 80)->unique();
$table->boolean('activated')->default(false);
$table->timestamps();
});
and run migrate command , have a error:
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your
MySQL server version for the right syntax to use near '('0'), `created_at` timestamp null, `updated_at` timestamp null) default charact'
at line 1 (SQL: create table `users` (`id` int unsigned not null auto_increment primary key, `username` varchar(255) not null, `email`
varchar(255) not null, `password` varchar(255) not null, `api_token` varchar(80) not null, `activated` tinyint(1) not null default ('0')
, `created_at` timestamp null, `updated_at` timestamp null) default character set utf8mb4 collate 'utf8mb4_unicode_ci')
and i think error is in activated column default value !
I think the issue related to laravel/framework #29943. Should be fixed in next release (current version is 6.0.2).
Yes
I looked at https://github.com/illuminate/database and i see i fixed but not release new version i think
Have the same issue.
Same Problem with me too
There seems to be a fix already on the Laravel Framework for this, but not on Lumen yet.
https://github.com/laravel/framework/pull/29878
This should be fixed with https://github.com/laravel/framework/releases/tag/v6.0.3
Have you all tried doing a composer update to include this release?
I just saw the illuminate components haven't been tagged yet with 6.0.3. I'll try to get that fixed later today. Thanks for bringing this to our attention.
Going to close it since this is related to laravel/framework and not lumen.
Most helpful comment
I think the issue related to laravel/framework #29943. Should be fixed in next release (current version is 6.0.2).