Fix migration
This commit is contained in:
parent
f3fab514a5
commit
313bc50103
@ -23,7 +23,6 @@ class CreateAllTables extends Migration
|
||||
$table->integer('permission')->default('0');
|
||||
$table->dateTime('last_sign_at');
|
||||
$table->dateTime('register_at');
|
||||
$table->rememberToken();
|
||||
});
|
||||
|
||||
Schema::create('closets', function (Blueprint $table) {
|
||||
|
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddRememberTokenToUsersTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->rememberToken();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
if (config('database.default') == 'sqlite') {
|
||||
// Dropping columns from a SQLite database requires `doctrine/dbal` dependency.
|
||||
// However, we won't install it because it's too hard to specify the version of
|
||||
// all the new dependencies exactly to make them support PHP ^5.5.9. Damn it.
|
||||
return;
|
||||
}
|
||||
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->dropColumn('remember_token');
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->rememberToken();
|
||||
});
|
7
database/update_scripts/update-3.5.0-to-4.0.0.php
Normal file
7
database/update_scripts/update-3.5.0-to-4.0.0.php
Normal file
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
use Artisan;
|
||||
|
||||
option(['version' => '4.0.0']);
|
||||
|
||||
Artisan::call('view:clear');
|
Loading…
Reference in New Issue
Block a user