Skip to content

Commit

Permalink
feat: stubs for migrations to remove docblocks (#160)
Browse files Browse the repository at this point in the history
  • Loading branch information
iBotPeaches authored Jan 15, 2022
1 parent 698b5ef commit 4622360
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 0 deletions.
22 changes: 22 additions & 0 deletions stubs/migration.create.stub
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php
declare(strict_types=1);

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class {{ class }} extends Migration
{
public function up(): void
{
Schema::create('{{ table }}', function (Blueprint $table) {
$table->id();
$table->timestamps();
});
}

public function down(): void
{
Schema::dropIfExists('{{ table }}');
}
}
19 changes: 19 additions & 0 deletions stubs/migration.stub
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php
declare(strict_types=1);

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class {{ class }} extends Migration
{
public function up(): void
{
//
}

public function down(): void
{
//
}
}
23 changes: 23 additions & 0 deletions stubs/migration.update.stub
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php
declare(strict_types=1);

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class {{ class }} extends Migration
{
public function up(): void
{
Schema::table('{{ table }}', function (Blueprint $table) {
//
});
}

public function down(): void
{
Schema::table('{{ table }}', function (Blueprint $table) {
//
});
}
}

0 comments on commit 4622360

Please sign in to comment.