Closed nWidart closed 7 years ago
Should work now on version 0.9.0.
Fyi docs say php artisan migrates
but it's migrate
.
They also fail with this
[Illuminate\Database\QueryException]
SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'started_at' (SQL: alter table `ci_runs` add `started_at` timestamp not null, add `ended_at` timestamp not null,
add `notified_at` timestamp null) (SQL: SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'started_at' (SQL: alter table `ci_runs` add `started_at` timestamp not
null, add `ended_at` timestamp not null, add `notified_at` timestamp null))
[Illuminate\Database\QueryException]
SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'started_at' (SQL: alter table `ci_runs` add `started_at` timestamp not null, add `ended_at` timestamp not null,
add `notified_at` timestamp null)
[PDOException]
SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'started_at'
Which database server?
Mysql 5.7
Ok, tested it only with PostgreSQL
Just tweeted the install process here: https://twitter.com/iantonioribeiro/status/917078384961875968
mysql 5.7 is stricter indeed. https://github.com/antonioribeiro/ci/blob/master/src/migrations/2017_09_27_800002_create_runs_start_end.php#L20 this needs a default value, or make it nullable. Same for other timestamp columns like ended_at.
Just did. 0.9.1 tagged. Thank you
Awesome. 👍
I'm getting the following error on mysql 5.6:
[Illuminate\Database\QueryException]
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 'jso
n null' at line 1 (SQL: alter table `ci_runs` add `screenshots` json null) (SQL: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual th
at corresponds to your MySQL server version for the right syntax to use near 'json null' at line 1 (SQL: alter table `ci_runs` add `screenshots` json null))
[Illuminate\Database\QueryException]
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 'jso
n null' at line 1 (SQL: alter table `ci_runs` add `screenshots` json null)
[PDOException]
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 'jso
n null' at line 1
I'll have to do a full run on MySQL, sorry about that. And maybe change that json column to text.
@antonioribeiro since laravel 5.4 the minimum php version is is 7.0, right? I remember ubuntu 16.04 taken as reference. mysql 5.7 is default in 16.04, I wouldn't bother making it compatible with 5.6. Maybe just add the option to publish the migrations to customize them if you're not using other json specific functions in the models
I just moved it from json to text, since I'm not using any json specific functions.
Tagged 0.9.2, with this one and some other fixes. And one nice change, if you enable script
on your tester it should give you all the reds and greens you usually see in terminal
/**
* script
*
*/
'script' => '/usr/bin/script -q %s %s', // sprintf()
/**
* Testers
*
*/
'testers' => [
'phpunit' => [
'command' => 'vendor/bin/phpunit',
'require_script' => true,
],
Causes the following issue: