mirror of
https://github.com/flarum/core.git
synced 2025-08-11 19:04:29 +02:00
Initial working extension
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Schema\Builder;
|
||||
|
||||
return [
|
||||
'up' => function(Builder $schema) {
|
||||
if (!$schema->hasColumn('users', 'nickname')) {
|
||||
$schema->table('users', function (Blueprint $table) use ($schema) {
|
||||
$table->string('nickname', 150)->after('username')->index();
|
||||
});
|
||||
}
|
||||
},
|
||||
'down' => function(Builder $schema) {
|
||||
$schema->table('users', function (Blueprint $table) use ($schema) {
|
||||
$table->dropColumn('nickname');
|
||||
});
|
||||
}
|
||||
];
|
Reference in New Issue
Block a user