mirror of
https://github.com/flarum/core.git
synced 2025-07-22 17:21:27 +02:00
Use new migration format
This commit is contained in:
@@ -8,24 +8,19 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Flarum\Sticky\Migration;
|
|
||||||
|
|
||||||
use Flarum\Database\AbstractMigration;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Schema\Builder;
|
||||||
|
|
||||||
class AddStickyToDiscussions extends AbstractMigration
|
return [
|
||||||
{
|
'up' => function (Builder $schema) {
|
||||||
public function up()
|
$schema->table('discussions', function (Blueprint $table) {
|
||||||
{
|
|
||||||
$this->schema->table('discussions', function (Blueprint $table) {
|
|
||||||
$table->boolean('is_sticky')->default(0);
|
$table->boolean('is_sticky')->default(0);
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
|
|
||||||
public function down()
|
'down' => function (Builder $schema) {
|
||||||
{
|
$schema->table('discussions', function (Blueprint $table) {
|
||||||
$this->schema->table('discussions', function (Blueprint $table) {
|
|
||||||
$table->dropColumn('is_sticky');
|
$table->dropColumn('is_sticky');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
];
|
||||||
|
Reference in New Issue
Block a user