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:
@@ -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();
|
||||
}
|
||||
];
|
||||
);
|
||||
|
Reference in New Issue
Block a user