]> BookStack Code Mirror - bookstack/commitdiff
Reverted shift change to old migration 3012/head
authorDan Brown <redacted>
Thu, 4 Nov 2021 22:38:55 +0000 (22:38 +0000)
committerDan Brown <redacted>
Thu, 4 Nov 2021 22:38:55 +0000 (22:38 +0000)
database/migrations/2018_08_04_115700_create_bookshelves_table.php

index 8dc2a72e9b9bd3ce335c5baa53ee1de469c7b61d..bb1aec95b6ca95bc831e8429e23a1204c8ea5b0d 100644 (file)
@@ -2,6 +2,7 @@
 
 use Illuminate\Database\Migrations\Migration;
 use Illuminate\Database\Schema\Blueprint;
 
 use Illuminate\Database\Migrations\Migration;
 use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\DB;
 use Illuminate\Support\Facades\Schema;
 
 class CreateBookshelvesTable extends Migration
 use Illuminate\Support\Facades\Schema;
 
 class CreateBookshelvesTable extends Migration
@@ -120,11 +121,11 @@ class CreateBookshelvesTable extends Migration
         Schema::dropIfExists('bookshelves');
 
         // Drop related polymorphic items
         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();
     }
 }
     }
 }