Skip to content

Commit

Permalink
Fixed Integrity constraint violation: 19 users.created_at may not be …
Browse files Browse the repository at this point in the history
…NULL

Signed-off-by: crynobone <crynobone@gmail.com>
  • Loading branch information
crynobone committed Oct 3, 2013
1 parent 9f00671 commit e7d59c5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/migrations/2013_07_26_182750_create_users_table.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php

use Carbon\Carbon;
use Illuminate\Database\Migrations\Migration;

class CreateUsersTable extends Migration {
Expand All @@ -20,9 +21,13 @@ public function up()
$table->timestamps();
});

$now = Carbon::now();

DB::table('users')->insert(array(
'email' => 'hello@orchestraplatform.com',
'password' => Hash::make('123'),
'email' => 'hello@orchestraplatform.com',
'password' => Hash::make('123'),
'created_at' => $now,
'updated_at' => $now,
));
}

Expand Down

0 comments on commit e7d59c5

Please sign in to comment.