Answers for "laravel migration without drop data"

PHP
0

laravel drop table migration

Schema::drop('users');

Schema::dropIfExists('users');
Posted by: Guest on April-27-2020
0

delete rows by migration laravel

Comment::where('post_id',$id)->delete();

// in down migration

    public function down()
    {
        Schema::table('package_types', function (Blueprint $table) {
            \App\Models\PackageType::query()->where('id','gt',1)->delete();
        });
    }
Posted by: Guest on August-14-2021

Code answers related to "laravel migration without drop data"

Browse Popular Code Answers by Language