26 lines
539 B
PHP
26 lines
539 B
PHP
|
|
<?php namespace RainLab\User\Updates;
|
||
|
|
|
||
|
|
use Schema;
|
||
|
|
use October\Rain\Database\Updates\Migration;
|
||
|
|
|
||
|
|
class UsersAddSellerId extends Migration
|
||
|
|
{
|
||
|
|
public function up()
|
||
|
|
{
|
||
|
|
Schema::table('users', function($table)
|
||
|
|
{
|
||
|
|
$table->integer('seller_id')->nullable();
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
public function down()
|
||
|
|
{
|
||
|
|
if (Schema::hasColumn('users', 'seller_id')) {
|
||
|
|
Schema::table('users', function($table)
|
||
|
|
{
|
||
|
|
$table->dropColumn('seller_id');
|
||
|
|
});
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|