Skip to content

Commit

Permalink
Add troubleshooting
Browse files Browse the repository at this point in the history
  • Loading branch information
antonioribeiro committed Jul 10, 2017
1 parent 608d63d commit 664b799
Showing 1 changed file with 37 additions and 4 deletions.
41 changes: 37 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -551,10 +551,13 @@ This is only needed if you are on Laravel 4, because `vendor:publish` does it fo

```php
'tracker' => [
'driver' => '...',
'host' => '...',
'database' => ...,
...
'tracker' => [
'driver' => '...',
'host' => '...',
'database' => ...,
'strict' => false, // to avoid problems on some MySQL installs
...
],
],
```

Expand Down Expand Up @@ -630,6 +633,36 @@ public function getIsAdminAttribute()

It can be 'admin', 'is_admin', 'root' or 'is_root'.

## Troubleshooting

#### SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for '<field name>'

This is probably related to SQL modes on MySQL, specifically with `NO_ZERO_IN_DATE` and `NO_ZERO_DATE` modes:

https://stackoverflow.com/questions/36882149/error-1067-42000-invalid-default-value-for-created-at


Because Laravel's defaults to

```sql
set session sql_mode='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'
```

You may need to change your Tracker database connection configuration to

```php
'connections' => [
...

'tracker' => [
...

'strict' => false,
],
],

```

## Author

[Antonio Carlos Ribeiro](http://twitter.com/iantonioribeiro)
Expand Down

0 comments on commit 664b799

Please sign in to comment.