@@ -77,15 +77,15 @@ discard block |
||
| 77 | 77 | private function dropPostTypes() |
| 78 | 78 | { |
| 79 | 79 | if (Schema::hasColumn('rainlab_blog_posts', PostType::TABLE_NAME . '_id')) { |
| 80 | - Schema::table('rainlab_blog_posts', static function ($table) { |
|
| 81 | - $table->dropForeign([PostType::TABLE_NAME . '_id']); |
|
| 80 | + Schema::table('rainlab_blog_posts', static function($table) { |
|
| 81 | + $table->dropForeign([ PostType::TABLE_NAME . '_id' ]); |
|
| 82 | 82 | |
| 83 | 83 | $table->dropColumn(PostType::TABLE_NAME . '_id'); |
| 84 | 84 | }); |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | if (Schema::hasColumn('rainlab_blog_posts', PostType::TABLE_NAME . '_attributes')) { |
| 88 | - Schema::table('rainlab_blog_posts', static function ($table) { |
|
| 88 | + Schema::table('rainlab_blog_posts', static function($table) { |
|
| 89 | 89 | $table->dropColumn(PostType::TABLE_NAME . '_attributes'); |
| 90 | 90 | }); |
| 91 | 91 | } |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | if (!Schema::hasTable(PostType::TABLE_NAME)) { |
| 102 | 102 | Schema::create( |
| 103 | 103 | PostType::TABLE_NAME, |
| 104 | - static function ($table) { |
|
| 104 | + static function($table) { |
|
| 105 | 105 | $table->engine = 'InnoDB'; |
| 106 | 106 | |
| 107 | 107 | $table->increments('id'); |
@@ -113,11 +113,11 @@ discard block |
||
| 113 | 113 | } |
| 114 | 114 | ); |
| 115 | 115 | |
| 116 | - Schema::table('rainlab_blog_posts', function ($table) { |
|
| 116 | + Schema::table('rainlab_blog_posts', function($table) { |
|
| 117 | 117 | $table->integer(PostType::TABLE_NAME . '_id')->unsigned()->nullable()->default(null); |
| 118 | 118 | $table->foreign(PostType::TABLE_NAME . '_id')->references('id')->on(PostType::TABLE_NAME)->onDelete('cascade'); |
| 119 | 119 | |
| 120 | - $table->text(PostType::TABLE_NAME. '_attributes')->nullable(); |
|
| 120 | + $table->text(PostType::TABLE_NAME . '_attributes')->nullable(); |
|
| 121 | 121 | }); |
| 122 | 122 | |
| 123 | 123 | DB::table(PostType::TABLE_NAME)->insert( |