Skip to content

PDOException: Integrity constraint violation 19 NOT NULL constraint failed #1

Closed
@jbrooksuk

Description

@jbrooksuk
jamesbrooks@jbrooksuk Cachet (master) $ php artisan tinker
$[1] > $incident = new Incident;
// object(Incident)(
//   'incrementing' => true,
//   'timestamps' => true,
//   'exists' => false
// )
[2] > $incident->name = "Test";
// 'Test'
[3] > $incident->message = "This is a test incident. Something went wrong.";
// 'This is a test incident. Something went wrong.'
[4] > $incident->save();
PHP Fatal error:  Uncaught exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 19 NOT NULL constraint failed: incidents.status' in /Users/jamesbrooks/Sites/Cachet/vendor/laravel/framework/src/Illuminate/Database/Connection.php:369
Stack trace:
#0 /Users/jamesbrooks/Sites/Cachet/vendor/laravel/framework/src/Illuminate/Database/Connection.php(369): PDOStatement->execute(Array)
#1 /Users/jamesbrooks/Sites/Cachet/vendor/laravel/framework/src/Illuminate/Database/Connection.php(617): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\SQLiteConnection), 'insert into "in...', Array)
#2 /Users/jamesbrooks/Sites/Cachet/vendor/laravel/framework/src/Illuminate/Database/Connection.php(581): Illuminate\Database\Connection->runQueryCallback('insert into "in...', Array, Object(Closure))
#3 /Users/jamesbrooks/Sites/Cachet/vendor/laravel/framework/src/Illuminate/Database/Connection.php(370): Illuminate\Database\Connection->run('insert into "in...', Array, Object(Closure)) in /Users/jamesbrooks/Sites/Cachet/vendor/laravel/framework/src/Illuminate/Database/Connection.php on line 625
[5] > exit;

I rarely use SQLite, so it's probably an obvious error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugBugs with Cachet

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions