| @@ 6-31 (lines=26) @@ | ||
| 3 | use Illuminate\Database\Migrations\Migration; |
|
| 4 | use Illuminate\Database\Schema\Blueprint; |
|
| 5 | ||
| 6 | class CreateCategoriesTable extends Migration |
|
| 7 | { |
|
| 8 | /** |
|
| 9 | * Run the migrations. |
|
| 10 | * |
|
| 11 | * @return void |
|
| 12 | */ |
|
| 13 | public function up() |
|
| 14 | { |
|
| 15 | Schema::create('blog__categories', function (Blueprint $table) { |
|
| 16 | $table->engine = 'InnoDB'; |
|
| 17 | $table->increments('id'); |
|
| 18 | $table->timestamps(); |
|
| 19 | }); |
|
| 20 | } |
|
| 21 | ||
| 22 | /** |
|
| 23 | * Reverse the migrations. |
|
| 24 | * |
|
| 25 | * @return void |
|
| 26 | */ |
|
| 27 | public function down() |
|
| 28 | { |
|
| 29 | Schema::drop('blog__categories'); |
|
| 30 | } |
|
| 31 | } |
|
| 32 | ||
| @@ 6-31 (lines=26) @@ | ||
| 3 | use Illuminate\Database\Migrations\Migration; |
|
| 4 | use Illuminate\Database\Schema\Blueprint; |
|
| 5 | ||
| 6 | class CreateTagsTable extends Migration |
|
| 7 | { |
|
| 8 | /** |
|
| 9 | * Run the migrations. |
|
| 10 | * |
|
| 11 | * @return void |
|
| 12 | */ |
|
| 13 | public function up() |
|
| 14 | { |
|
| 15 | Schema::create('blog__tags', function (Blueprint $table) { |
|
| 16 | $table->engine = 'InnoDB'; |
|
| 17 | $table->increments('id'); |
|
| 18 | $table->timestamps(); |
|
| 19 | }); |
|
| 20 | } |
|
| 21 | ||
| 22 | /** |
|
| 23 | * Reverse the migrations. |
|
| 24 | * |
|
| 25 | * @return void |
|
| 26 | */ |
|
| 27 | public function down() |
|
| 28 | { |
|
| 29 | Schema::drop('blog__tags'); |
|
| 30 | } |
|
| 31 | } |
|
| 32 | ||