1
0
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:
Matthew Kilgore
2020-11-23 23:17:55 -05:00
parent 350ce11f17
commit dbc67937ed
25 changed files with 5030 additions and 23 deletions

View File

@@ -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');
});
}
];