@@ -53,8 +53,8 @@ discard block |
||
53 | 53 | */ |
54 | 54 | private function dropSeries() |
55 | 55 | { |
56 | - Schema::table('rainlab_blog_posts', function ($table) { |
|
57 | - $table->dropForeign([Series::TABLE_NAME . '_id']); |
|
56 | + Schema::table('rainlab_blog_posts', function($table) { |
|
57 | + $table->dropForeign([ Series::TABLE_NAME . '_id' ]); |
|
58 | 58 | $table->dropColumn(Series::TABLE_NAME . '_id'); |
59 | 59 | }); |
60 | 60 | |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | if (!Schema::hasTable(Tag::TABLE_NAME)) { |
70 | 70 | Schema::create( |
71 | 71 | Tag::TABLE_NAME, |
72 | - static function ($table) { |
|
72 | + static function($table) { |
|
73 | 73 | $table->engine = 'InnoDB'; |
74 | 74 | |
75 | 75 | $table->increments('id'); |
@@ -83,12 +83,12 @@ discard block |
||
83 | 83 | if (!Schema::hasTable(Tag::CROSS_REFERENCE_TABLE_NAME)) { |
84 | 84 | Schema::create( |
85 | 85 | Tag::CROSS_REFERENCE_TABLE_NAME, |
86 | - static function ($table) { |
|
86 | + static function($table) { |
|
87 | 87 | $table->engine = 'InnoDB'; |
88 | 88 | |
89 | 89 | $table->integer('tag_id')->unsigned()->nullable()->default(null); |
90 | 90 | $table->integer('post_id')->unsigned()->nullable()->default(null); |
91 | - $table->index(['tag_id', 'post_id']); |
|
91 | + $table->index([ 'tag_id', 'post_id' ]); |
|
92 | 92 | $table->foreign('tag_id', 'Tag reference')->references('id')->on(Tag::TABLE_NAME)->onDelete('cascade'); |
93 | 93 | $table->foreign('post_id', 'Post reference')->references('id')->on('rainlab_blog_posts')->onDelete('cascade'); |
94 | 94 | } |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | if (!Schema::hasTable(Series::TABLE_NAME)) { |
105 | 105 | Schema::create( |
106 | 106 | Series::TABLE_NAME, |
107 | - static function ($table) { |
|
107 | + static function($table) { |
|
108 | 108 | $table->engine = 'InnoDB'; |
109 | 109 | |
110 | 110 | $table->increments('id'); |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | } |
116 | 116 | ); |
117 | 117 | |
118 | - Schema::table('rainlab_blog_posts', function ($table) { |
|
118 | + Schema::table('rainlab_blog_posts', function($table) { |
|
119 | 119 | $table->integer(Series::TABLE_NAME . '_id')->unsigned()->nullable()->default(null); |
120 | 120 | $table->foreign(Series::TABLE_NAME . '_id')->references('id')->on(Series::TABLE_NAME)->onDelete('cascade'); |
121 | 121 | }); |
@@ -50,12 +50,12 @@ |
||
50 | 50 | if (!Schema::hasTable(Series::RELATED_SERIES_TABLE_NAME)) { |
51 | 51 | Schema::create( |
52 | 52 | Series::RELATED_SERIES_TABLE_NAME, |
53 | - static function ($table) { |
|
53 | + static function($table) { |
|
54 | 54 | $table->engine = 'InnoDB'; |
55 | 55 | |
56 | 56 | $table->integer('series_id')->unsigned(); |
57 | 57 | $table->integer('related_series_id')->unsigned(); |
58 | - $table->index(['series_id', 'related_series_id']); |
|
58 | + $table->index([ 'series_id', 'related_series_id' ]); |
|
59 | 59 | $table->foreign('series_id', 'Series reference')->references('id')->on(Series::TABLE_NAME)->onDelete('cascade'); |
60 | 60 | $table->foreign('related_series_id', 'Related series reference')->references('id')->on(Series::TABLE_NAME)->onDelete('cascade'); |
61 | 61 | } |