File tree 1 file changed +7
-4
lines changed
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 3
3
use Illuminate \Database \Migrations \Migration ;
4
4
use Illuminate \Database \Schema \Blueprint ;
5
5
6
- class CreateTagsTable extends Migration {
6
+ class CreateTagsTable extends Migration
7
+ {
7
8
/**
8
9
* Run the migrations.
9
10
*
10
11
* @return void
11
12
*/
12
- public function up () {
13
+ public function up ()
14
+ {
13
15
Schema::create ('tags ' , function (Blueprint $ table ) {
14
16
$ table ->increments ('id ' );
15
17
$ table ->string ('name ' );
16
- $ table ->integer ('user_id ' )->unsigned ();
18
+ $ table ->integer ('user_id ' )->unsigned ()-> nullable () ;
17
19
$ table ->integer ('is_special_tag ' )->default ('0 ' );
18
20
$ table ->timestamps ();
19
21
@@ -26,7 +28,8 @@ public function up() {
26
28
*
27
29
* @return void
28
30
*/
29
- public function down () {
31
+ public function down ()
32
+ {
30
33
Schema::drop ('tags ' );
31
34
}
32
35
}
You can’t perform that action at this time.
0 commit comments