4
0
Fork 0

调整文章扩展迁移

master
vine_liutk 2022-08-19 13:28:00 +08:00
parent ca2523a3f8
commit bc26df2391
2 changed files with 9 additions and 3 deletions

View File

@ -27,6 +27,9 @@ class AddMediaToArticleTable extends Migration
*/
public function down()
{
Schema::dropColumns(['media_path']);
Schema::table('articles', function (Blueprint $table) {
//
$table->dropColumn('media_path');
});
}
};

View File

@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateArticleTable extends Migration
class AddnumToArticleTable extends Migration
{
/**
* Run the migrations.
@ -28,6 +28,9 @@ class CreateArticleTable extends Migration
*/
public function down()
{
Schema::dropColumns(['like_nums', 'read_nums']);
Schema::table('articles', function (Blueprint $table) {
//
$table->dropColumn(['like_nums', 'read_nums']);
});
}
};