Skip to content
This repository has been archived by the owner on Jul 9, 2019. It is now read-only.

Commit

Permalink
Update 2017_09_05_214452_add_time_attribute_to_users.php
Browse files Browse the repository at this point in the history
  • Loading branch information
Charlie authored May 14, 2018
1 parent 7e4f912 commit a55645d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions migrations/2017_09_05_214452_add_time_attribute_to_users.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@

return [
'up' => function (Builder $schema) {
$schema->table('users', function (Blueprint $table) {
$table->dateTime('last_vote_time');
});
if (!$schema->hasColumn('users', 'last_vote_time')) {
$schema->table('users', function (Blueprint $table) {
$table->dateTime('last_vote_time');
});
}
},
'down' => function (Builder $schema) {
$schema->table('users', function (Blueprint $table) {
Expand Down

0 comments on commit a55645d

Please sign in to comment.