From 0b6cedee0cdb60c2beb709a3781b3c01b585abc2 Mon Sep 17 00:00:00 2001 From: Jan Iwanow Date: Sun, 18 May 2014 16:08:07 +1100 Subject: [PATCH] fixed #115 and added some spaces --- .../Generators/stubs/migrations/closuretable.php | 9 ++++++--- .../ClosureTable/Generators/stubs/migrations/entity.php | 7 +++++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/Franzose/ClosureTable/Generators/stubs/migrations/closuretable.php b/src/Franzose/ClosureTable/Generators/stubs/migrations/closuretable.php index 19b60c7..7703290 100644 --- a/src/Franzose/ClosureTable/Generators/stubs/migrations/closuretable.php +++ b/src/Franzose/ClosureTable/Generators/stubs/migrations/closuretable.php @@ -7,9 +7,12 @@ class {{closure_class}} extends Migration { public function up() { - Schema::table('{{closure_table}}', function(Blueprint $table){ + Schema::table('{{closure_table}}', function(Blueprint $table) + { $table->engine = 'InnoDB'; - Schema::create('{{closure_table}}', function(Blueprint $t){ + + Schema::create('{{closure_table}}', function(Blueprint $t) + { $t->increments('ctid'); $t->integer('ancestor', false, true); @@ -27,6 +30,6 @@ public function down() Schema::table('{{closure_table}}', function(Blueprint $table) { Schema::dropIfExists('{{closure_table}}'); - } + }); } } diff --git a/src/Franzose/ClosureTable/Generators/stubs/migrations/entity.php b/src/Franzose/ClosureTable/Generators/stubs/migrations/entity.php index 3d57a86..b32841f 100644 --- a/src/Franzose/ClosureTable/Generators/stubs/migrations/entity.php +++ b/src/Franzose/ClosureTable/Generators/stubs/migrations/entity.php @@ -7,9 +7,12 @@ class {{entity_class}} extends Migration { public function up() { - Schema::table('{{entity_table}}', function(Blueprint $table){ + Schema::table('{{entity_table}}', function(Blueprint $table) + { $table->engine = 'InnoDB'; - Schema::create('{{entity_table}}', function(Blueprint $t){ + + Schema::create('{{entity_table}}', function(Blueprint $t) + { $t->increments('id'); $t->integer('parent_id')->unsigned()->nullable(); $t->integer('position', false, true);