mirror of
https://github.com/flarum/core.git
synced 2025-07-19 07:41:22 +02:00
Update generate:migration command to deal with new migration structure
This commit is contained in:
@@ -1,18 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace {{namespace}}\Migration;
|
||||
use Illuminate\Database\Schema\Builder;
|
||||
|
||||
use Flarum\Database\AbstractMigration;
|
||||
return [
|
||||
'up' => function (Builder $schema) {
|
||||
//
|
||||
},
|
||||
|
||||
class {{name}} extends AbstractMigration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
'down' => function (Builder $schema) {
|
||||
//
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
];
|
||||
|
@@ -1,21 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace {{namespace}}\Migration;
|
||||
|
||||
use Flarum\Database\AbstractMigration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Schema\Builder;
|
||||
|
||||
class {{name}} extends AbstractMigration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
$this->schema->create('{{table}}', function (Blueprint $table) {
|
||||
return [
|
||||
'up' => function (Builder $schema) {
|
||||
$schema->create('{{table}}', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->schema->drop('{{table}}');
|
||||
'down' => function (Builder $schema) {
|
||||
$schema->drop('{{table}}');
|
||||
}
|
||||
}
|
||||
];
|
||||
|
@@ -1,23 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace {{namespace}}\Migration;
|
||||
|
||||
use Flarum\Database\AbstractMigration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Schema\Builder;
|
||||
|
||||
class {{name}} extends AbstractMigration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
$this->schema->table('{{table}}', function (Blueprint $table) {
|
||||
return [
|
||||
'up' => function (Builder $schema) {
|
||||
$schema->table('{{table}}', function (Blueprint $table) {
|
||||
//
|
||||
});
|
||||
},
|
||||
|
||||
'down' => function (Builder $schema) {
|
||||
$schema->table('{{table}}', function (Blueprint $table) {
|
||||
//
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->schema->table('{{table}}', function (Blueprint $table) {
|
||||
//
|
||||
});
|
||||
}
|
||||
}
|
||||
];
|
||||
|
Reference in New Issue
Block a user