Fix migration on SQLite database

This commit is contained in:
printempw 2018-07-27 02:34:35 +08:00
parent aaf701f364
commit a91d750b5c

View File

@ -25,6 +25,13 @@ class AddVerificationToUsersTable extends Migration
*/
public function down()
{
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('verified');
$table->dropColumn('verification_token');