Reverted shift change to old migration

This commit is contained in:
Dan Brown 2021-11-04 22:38:55 +00:00
parent 9c680efaad
commit 6f75aa9cdc
No known key found for this signature in database
GPG Key ID: 46D9F943C24A2EF9

View File

@ -2,6 +2,7 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
class CreateBookshelvesTable extends Migration
@ -120,11 +121,11 @@ class CreateBookshelvesTable extends Migration
Schema::dropIfExists('bookshelves');
// Drop related polymorphic items
DB::table('activities')->where('entity_type', '=', \BookStack\Entities\Models\Bookshelf::class)->delete();
DB::table('views')->where('viewable_type', '=', \BookStack\Entities\Models\Bookshelf::class)->delete();
DB::table('entity_permissions')->where('restrictable_type', '=', \BookStack\Entities\Models\Bookshelf::class)->delete();
DB::table('tags')->where('entity_type', '=', \BookStack\Entities\Models\Bookshelf::class)->delete();
DB::table('search_terms')->where('entity_type', '=', \BookStack\Entities\Models\Bookshelf::class)->delete();
DB::table('comments')->where('entity_type', '=', \BookStack\Entities\Models\Bookshelf::class)->delete();
DB::table('activities')->where('entity_type', '=', 'BookStack\Entities\Models\Bookshelf')->delete();
DB::table('views')->where('viewable_type', '=', 'BookStack\Entities\Models\Bookshelf')->delete();
DB::table('entity_permissions')->where('restrictable_type', '=', 'BookStack\Entities\Models\Bookshelf')->delete();
DB::table('tags')->where('entity_type', '=', 'BookStack\Entities\Models\Bookshelf')->delete();
DB::table('search_terms')->where('entity_type', '=', 'BookStack\Entities\Models\Bookshelf')->delete();
DB::table('comments')->where('entity_type', '=', 'BookStack\Entities\Models\Bookshelf')->delete();
}
}