kosa3 / migration-stub-extention
Installs: 9
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 1
pkg:composer/kosa3/migration-stub-extention
Requires
- php: ^7.0
- laravel/framework: ^5.5
This package is not auto-updated.
Last update: 2025-12-23 17:02:47 UTC
README
Install
Require this package with composer using the following command:
composer require --dev kosa3/migration-stub-extention:dev-master
After updating composer, add the migration directory to the resources stubs blank.stub create.stub update.stub
You can customize the stub file freely.
public function up() { Schema::create('DummyTable', function (Blueprint $table) { $table->bigIncrements('id'); $table->timestamp('created_at')->nullable(); $table->string('create_type', 32)->nullable()->default(null); $table->integer('create_id')->nullable()->default(null); $table->timestamp('updated_at')->nullable(); $table->string('update_type', 32)->nullable()->default(null); $table->integer('update_id')->nullable()->default(null); }); }
After edited, make migration file by artisan command.
php artisan make:migration CreateUser --create users
class CreateUser extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('users', function (Blueprint $table) { $table->bigIncrements('id'); $table->timestamp('created_at')->nullable(); $table->string('create_type', 32)->nullable()->default(null); $table->integer('create_id')->nullable()->default(null); $table->timestamp('updated_at')->nullable(); $table->string('update_type', 32)->nullable()->default(null); $table->integer('update_id')->nullable()->default(null); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('users'); } }
License
The package is open-source software licensed under the MIT license.