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,18 +8,13 @@
* 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('config', function (Blueprint $table) {
$table->string('key', 100)->primary();
$table->binary('value')->nullable();
});
},
'down' => function (Builder $schema) {
$schema->drop('config');
return Migration::createTable(
'config',
function (Blueprint $table) {
$table->string('key', 100)->primary();
$table->binary('value')->nullable();
}
];
);