Skip to content

Commit

Permalink
Add migration
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas committed Jan 12, 2020
1 parent 5410d77 commit 2945476
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions migrations/2020_01_12_000000_update_discussions_tables.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Schema\Builder;

return [
'up' => function (Builder $schema) {
$schema->table('discussions', function (Blueprint $table) {
$table->tinyInteger('hide_me')->unsigned()->nullable()->default(1);
});
},
'down' => function (Builder $schema) {
$schema->table('discussions', function (Blueprint $table) {
$table->dropColumn([
'hide_me',
]);
});
}
];

0 comments on commit 2945476

Please sign in to comment.