Skip to content

Blueprint type before $table, uncomment migration code block, replace create, drop to table and curly brace position #50

@dimti

Description

@dimti

Migration generated without Blueprint type of $table and commented migration code block - why?
Better - place migration code block without comments and with true typing

Replace:

<?php namespace {namespace};

use Schema;
use Winter\Storm\Database\Updates\Migration;

class {className} extends Migration
{
    public function up()
    {
        // Schema::create('{tableNamePrefix}_table', function($table)
        // {
        // });
    }

    public function down()
    {
        // Schema::drop('{tableNamePrefix}_table');
    }
}

To:

<?php namespace {namespace};

use Schema;
use Winter\Storm\Database\Schema\Blueprint;
use Winter\Storm\Database\Updates\Migration;

class {className} extends Migration
{
    public function up()
    {
        Schema::table('{tableNamePrefix}_table', function (Blueprint $table) {

        });
    }

    public function down()
    {
        Schema::table('{tableNamePrefix}_table', function (Blueprint $table) {

        });
    }
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions