Can we see the test also?
Apr 11, 2016
4
Level 3
Homestead sqlite timestamp non-contant default
Hi
I run my integration tests with
'sqlite_testing' => [
'driver' => 'sqlite',
'database' => ':memory:',
'prefix' => '',
],
and use the
use DatabaseMigrations;
Trait. Until now everything was fine. Today i tried to add a timestamp column to an existing table.
Schema::table('mytablename', function ($table) {
$table->timestamp('mycolumnname')->useCurrent();
});
In my Homestead mySQL everything is OK but my Test fail with
Illuminate\Database\QueryException: SQLSTATE[HY000]: General error: 1 Cannot add a column with non-constant default (SQL: alter table "mytablename" add column "mycolumnname" datetime not null default CURRENT_TIMESTAMP)
Any Idea how to fix this? Its annoying to spent a lot of time to fix "not real" problems :(
Thanks!
Max
Please or to participate in this conversation.