26 lines
549 B
PHP
26 lines
549 B
PHP
<?php namespace RainLab\User\Updates;
|
|
|
|
use Schema;
|
|
use October\Rain\Database\Updates\Migration;
|
|
|
|
class UsersAddFeatured extends Migration
|
|
{
|
|
public function up()
|
|
{
|
|
Schema::table('users', function($table)
|
|
{
|
|
$table->boolean('is_featured')->default(false);
|
|
});
|
|
}
|
|
|
|
public function down()
|
|
{
|
|
if (Schema::hasColumn('users', 'is_featured')) {
|
|
Schema::table('users', function($table)
|
|
{
|
|
$table->dropColumn('is_featured');
|
|
});
|
|
}
|
|
}
|
|
}
|