1
0
mirror of https://github.com/flarum/core.git synced 2025-08-12 11:24:30 +02:00

Use the new migration shortcuts in most of core's migrations

This commit is contained in:
Franz Liedke
2016-02-25 00:50:54 +09:00
parent db7a03fbe5
commit 2b5dab73f9
18 changed files with 149 additions and 255 deletions

View File

@@ -8,21 +8,16 @@
* file that was distributed with this source code.
*/
use Flarum\Database\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Schema\Builder;
return [
'up' => function (Builder $schema) {
$schema->create('groups', function (Blueprint $table) {
$table->increments('id');
$table->string('name_singular', 100);
$table->string('name_plural', 100);
$table->string('color', 20)->nullable();
$table->string('icon', 100)->nullable();
});
},
'down' => function (Builder $schema) {
$schema->drop('groups');
return Migration::createTable(
'groups',
function (Blueprint $table) {
$table->increments('id');
$table->string('name_singular', 100);
$table->string('name_plural', 100);
$table->string('color', 20)->nullable();
$table->string('icon', 100)->nullable();
}
];
);