Skip to content
This repository has been archived by the owner on Jun 29, 2023. It is now read-only.

Commit

Permalink
Add additional migration stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
spawnia committed Aug 3, 2021
1 parent b83f49d commit c251981
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

## v1.2.0

### Added

- Add `migration.create.stub`
- Add `migration.update.stub`

## v1.1.0

### Changed
Expand Down
15 changes: 15 additions & 0 deletions src/stubs/migration.create.stub
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php declare(strict_types=1);

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

final class {{ class }} extends Migration
{
public function up(): void
{
Schema::create('{{ table }}', function (Blueprint $table): void {
$table->id();
});
}
}
15 changes: 15 additions & 0 deletions src/stubs/migration.update.stub
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php declare(strict_types=1);

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

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

0 comments on commit c251981

Please sign in to comment.