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