repo stringlengths 7 63 | file_url stringlengths 81 284 | file_path stringlengths 5 200 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:02:33 2026-01-05 05:24:06 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/Commands/RegeneratePermissionsCommandTest.php | tests/Commands/RegeneratePermissionsCommandTest.php | <?php
namespace Tests\Commands;
use BookStack\Auth\Permissions\CollapsedPermission;
use BookStack\Permissions\Models\JointPermission;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\DB;
use Tests\TestCase;
class RegeneratePermissionsCommandTest extends TestCase
{
public function test_regen... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/Commands/ClearActivityCommandTest.php | tests/Commands/ClearActivityCommandTest.php | <?php
namespace Tests\Commands;
use BookStack\Activity\ActivityType;
use BookStack\Facades\Activity;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\DB;
use Tests\TestCase;
class ClearActivityCommandTest extends TestCase
{
public function test_clear_activity_command()
{
$this->... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/Commands/CreateAdminCommandTest.php | tests/Commands/CreateAdminCommandTest.php | <?php
namespace Tests\Commands;
use BookStack\Users\Models\Role;
use BookStack\Users\Models\User;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Hash;
use Tests\TestCase;
class CreateAdminCommandTest extends TestCase
{
public function test_standard_com... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/Commands/CleanupImagesCommandTest.php | tests/Commands/CleanupImagesCommandTest.php | <?php
namespace Tests\Commands;
use BookStack\Uploads\Image;
use Tests\TestCase;
class CleanupImagesCommandTest extends TestCase
{
public function test_command_defaults_to_dry_run()
{
$page = $this->entities->page();
$image = Image::factory()->create(['uploaded_to' => $page->id]);
$t... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/Commands/ClearViewsCommandTest.php | tests/Commands/ClearViewsCommandTest.php | <?php
namespace Tests\Commands;
use BookStack\Entities\Models\Page;
use Illuminate\Support\Facades\DB;
use Tests\TestCase;
class ClearViewsCommandTest extends TestCase
{
public function test_clear_views_command()
{
$this->asEditor();
$page = Page::first();
$this->get($page->getUrl())... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/Commands/UpgradeDatabaseEncodingCommandTest.php | tests/Commands/UpgradeDatabaseEncodingCommandTest.php | <?php
namespace Tests\Commands;
use Tests\TestCase;
class UpgradeDatabaseEncodingCommandTest extends TestCase
{
public function test_command_outputs_sql()
{
$this->artisan('bookstack:db-utf8mb4')
->expectsOutputToContain('ALTER DATABASE')
->expectsOutputToContain('ALTER TABLE ... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/Commands/RegenerateSearchCommandTest.php | tests/Commands/RegenerateSearchCommandTest.php | <?php
namespace Tests\Commands;
use BookStack\Search\SearchTerm;
use Illuminate\Support\Facades\DB;
use Tests\TestCase;
class RegenerateSearchCommandTest extends TestCase
{
public function test_command_regenerates_index()
{
DB::rollBack();
$page = $this->entities->page();
SearchTerm::... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/Commands/UpdateUrlCommandTest.php | tests/Commands/UpdateUrlCommandTest.php | <?php
namespace Tests\Commands;
use BookStack\Entities\Models\Entity;
use Illuminate\Support\Facades\Artisan;
use Symfony\Component\Console\Exception\RuntimeException;
use Tests\TestCase;
class UpdateUrlCommandTest extends TestCase
{
public function test_command_updates_page_content()
{
$page = $this... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/Commands/RegenerateReferencesCommandTest.php | tests/Commands/RegenerateReferencesCommandTest.php | <?php
namespace Tests\Commands;
use Illuminate\Support\Facades\DB;
use Tests\TestCase;
class RegenerateReferencesCommandTest extends TestCase
{
public function test_regenerate_references_command()
{
$page = $this->entities->page();
$book = $page->book;
$page->html = '<a href="' . $bo... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/Commands/CopyShelfPermissionsCommandTest.php | tests/Commands/CopyShelfPermissionsCommandTest.php | <?php
namespace Tests\Commands;
use BookStack\Entities\Models\Bookshelf;
use Tests\TestCase;
class CopyShelfPermissionsCommandTest extends TestCase
{
public function test_copy_shelf_permissions_command_shows_error_when_no_required_option_given()
{
$this->artisan('bookstack:copy-shelf-permissions')
... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/Commands/DeleteUsersCommandTest.php | tests/Commands/DeleteUsersCommandTest.php | <?php
namespace Tests\Commands;
use BookStack\Users\Models\User;
use Illuminate\Database\Eloquent\Collection;
use Tests\TestCase;
class DeleteUsersCommandTest extends TestCase
{
public function test_command_deletes_users()
{
$userCount = User::query()->count();
$normalUsers = $this->getNormal... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/Commands/AssignSortRuleCommandTest.php | tests/Commands/AssignSortRuleCommandTest.php | <?php
namespace Tests\Commands;
use BookStack\Entities\Models\Book;
use BookStack\Sorting\SortRule;
use Tests\TestCase;
class AssignSortRuleCommandTest extends TestCase
{
public function test_no_given_sort_rule_lists_options()
{
$sortRules = SortRule::factory()->createMany(10);
$commandRun =... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/Commands/ClearRevisionsCommandTest.php | tests/Commands/ClearRevisionsCommandTest.php | <?php
namespace Tests\Commands;
use BookStack\Entities\Models\Page;
use BookStack\Entities\Repos\PageRepo;
use Illuminate\Support\Facades\Artisan;
use Tests\TestCase;
class ClearRevisionsCommandTest extends TestCase
{
public function test_clear_revisions_command()
{
$this->asEditor();
$pageRe... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/Sorting/SortRuleTest.php | tests/Sorting/SortRuleTest.php | <?php
namespace Tests\Sorting;
use BookStack\Activity\ActivityType;
use BookStack\Entities\Models\Book;
use BookStack\Sorting\SortRule;
use BookStack\Sorting\SortRuleOperation;
use Tests\Api\TestsApi;
use Tests\TestCase;
class SortRuleTest extends TestCase
{
use TestsApi;
public function test_manage_setting... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/Sorting/BookSortTest.php | tests/Sorting/BookSortTest.php | <?php
namespace Tests\Sorting;
use BookStack\Entities\Models\Chapter;
use BookStack\Entities\Models\Page;
use BookStack\Entities\Repos\PageRepo;
use BookStack\Sorting\SortRule;
use Tests\TestCase;
class BookSortTest extends TestCase
{
public function test_book_sort_page_shows()
{
$bookToSort = $this-... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/Sorting/MoveTest.php | tests/Sorting/MoveTest.php | <?php
namespace Tests\Sorting;
use BookStack\Entities\Models\Book;
use BookStack\Entities\Models\Chapter;
use BookStack\Entities\Models\Page;
use Tests\TestCase;
class MoveTest extends TestCase
{
public function test_page_move_into_book()
{
$page = $this->entities->page();
$currentBook = $pag... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/Settings/RegenerateReferencesTest.php | tests/Settings/RegenerateReferencesTest.php | <?php
namespace Tests\Settings;
use BookStack\Activity\ActivityType;
use BookStack\References\ReferenceStore;
use Tests\TestCase;
class RegenerateReferencesTest extends TestCase
{
public function test_option_visible_on_maintenance_page()
{
$pageView = $this->asAdmin()->get('/settings/maintenance');
... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/Settings/TestEmailTest.php | tests/Settings/TestEmailTest.php | <?php
namespace Tests\Settings;
use BookStack\Settings\TestEmailNotification;
use Illuminate\Contracts\Notifications\Dispatcher;
use Illuminate\Support\Facades\Notification;
use Tests\TestCase;
class TestEmailTest extends TestCase
{
public function test_a_send_test_button_shows()
{
$pageView = $this-... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/Settings/PageListLimitsTest.php | tests/Settings/PageListLimitsTest.php | <?php
namespace Tests\Settings;
use BookStack\Entities\Models\Book;
use BookStack\Entities\Models\Bookshelf;
use Tests\TestCase;
class PageListLimitsTest extends TestCase
{
public function test_saving_setting_and_loading()
{
$resp = $this->asAdmin()->post('/settings/sorting', [
'setting-l... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/Settings/CustomHeadContentTest.php | tests/Settings/CustomHeadContentTest.php | <?php
namespace Tests\Settings;
use BookStack\Util\CspService;
use Tests\TestCase;
class CustomHeadContentTest extends TestCase
{
public function test_configured_content_shows_on_pages()
{
$this->setSettings(['app-custom-head' => '<script>console.log("cat");</script>']);
$resp = $this->get('/... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/Settings/RecycleBinTest.php | tests/Settings/RecycleBinTest.php | <?php
namespace Tests\Settings;
use BookStack\Entities\Models\Book;
use BookStack\Entities\Models\Chapter;
use BookStack\Entities\Models\Deletion;
use BookStack\Entities\Models\Page;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\DB;
use Tests\TestCase;
class RecycleBinTest extends TestCase
{
publ... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/Settings/FooterLinksTest.php | tests/Settings/FooterLinksTest.php | <?php
namespace Tests\Settings;
use Tests\TestCase;
class FooterLinksTest extends TestCase
{
public function test_saving_setting()
{
$resp = $this->asAdmin()->post('/settings/customization', [
'setting-app-footer-links' => [
['label' => 'My custom link 1', 'url' => 'https:... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/tests/Settings/SettingsTest.php | tests/Settings/SettingsTest.php | <?php
namespace Tests\Settings;
use Tests\TestCase;
class SettingsTest extends TestCase
{
public function test_admin_can_see_settings()
{
$this->asAdmin()->get('/settings/features')->assertSee('Settings');
}
public function test_settings_endpoint_redirects_to_settings_view()
{
$r... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/routes/web.php | routes/web.php | <?php
use BookStack\Access\Controllers as AccessControllers;
use BookStack\Activity\Controllers as ActivityControllers;
use BookStack\Api\ApiDocsController;
use BookStack\Api\UserApiTokenController;
use BookStack\App\HomeController;
use BookStack\App\MetaController;
use BookStack\Entities\Controllers as EntityControll... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/routes/api.php | routes/api.php | <?php
/**
* Routes for the BookStack API.
* Routes have a URI prefix of /api/.
* Controllers all end with "ApiController"
*/
use BookStack\Activity\Controllers as ActivityControllers;
use BookStack\Api\ApiDocsController;
use BookStack\App\SystemApiController;
use BookStack\Entities\Controllers as EntityController... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/public/index.php | public/index.php | <?php
use BookStack\Http\Request;
use Illuminate\Contracts\Http\Kernel;
define('LARAVEL_START', microtime(true));
// Determine if the application is in maintenance mode...
if (file_exists(__DIR__ . '/../storage/framework/maintenance.php')) {
require __DIR__ . '/../storage/framework/maintenance.php';
}
// Regist... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/factories/Users/Models/RoleFactory.php | database/factories/Users/Models/RoleFactory.php | <?php
namespace Database\Factories\Users\Models;
use Illuminate\Database\Eloquent\Factories\Factory;
class RoleFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = \BookStack\Users\Models\Role::class;
/**
* Define t... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/factories/Users/Models/UserFactory.php | database/factories/Users/Models/UserFactory.php | <?php
namespace Database\Factories\Users\Models;
use BookStack\Users\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
class UserFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = ... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/factories/Activity/Models/ActivityFactory.php | database/factories/Activity/Models/ActivityFactory.php | <?php
namespace Database\Factories\Activity\Models;
use BookStack\Activity\ActivityType;
use BookStack\Users\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\BookStack\Activity\Models\Activity>
*/
class ActivityFactory extends Factory
... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/factories/Activity/Models/WebhookFactory.php | database/factories/Activity/Models/WebhookFactory.php | <?php
namespace Database\Factories\Activity\Models;
use BookStack\Activity\Models\Webhook;
use Illuminate\Database\Eloquent\Factories\Factory;
class WebhookFactory extends Factory
{
protected $model = Webhook::class;
/**
* Define the model's default state.
*
* @return array
*/
public... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/factories/Activity/Models/TagFactory.php | database/factories/Activity/Models/TagFactory.php | <?php
namespace Database\Factories\Activity\Models;
use Illuminate\Database\Eloquent\Factories\Factory;
class TagFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = \BookStack\Activity\Models\Tag::class;
/**
* Defi... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/factories/Activity/Models/FavouriteFactory.php | database/factories/Activity/Models/FavouriteFactory.php | <?php
namespace Database\Factories\Activity\Models;
use BookStack\Entities\Models\Book;
use BookStack\Users\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\BookStack\Activity\Models\Favourite>
*/
class FavouriteFactory extends Factory... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/factories/Activity/Models/CommentFactory.php | database/factories/Activity/Models/CommentFactory.php | <?php
namespace Database\Factories\Activity\Models;
use BookStack\Users\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
class CommentFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = \BookStack\Activity\Mo... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/factories/Activity/Models/WebhookTrackedEventFactory.php | database/factories/Activity/Models/WebhookTrackedEventFactory.php | <?php
namespace Database\Factories\Activity\Models;
use BookStack\Activity\ActivityType;
use BookStack\Activity\Models\Webhook;
use Illuminate\Database\Eloquent\Factories\Factory;
class WebhookTrackedEventFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array
*/
... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/factories/Activity/Models/WatchFactory.php | database/factories/Activity/Models/WatchFactory.php | <?php
namespace Database\Factories\Activity\Models;
use BookStack\Activity\WatchLevels;
use BookStack\Entities\Models\Book;
use BookStack\Users\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\BookStack\Activity\Models\Watch>
*/
class ... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/factories/Uploads/ImageFactory.php | database/factories/Uploads/ImageFactory.php | <?php
namespace Database\Factories\Uploads;
use Illuminate\Database\Eloquent\Factories\Factory;
class ImageFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = \BookStack\Uploads\Image::class;
/**
* Define the model... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/factories/Uploads/AttachmentFactory.php | database/factories/Uploads/AttachmentFactory.php | <?php
namespace Database\Factories\Uploads;
use BookStack\Entities\Models\Page;
use BookStack\Users\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\BookStack\Uploads\Attachment>
*/
class AttachmentFactory extends Factory
{
/**
... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/factories/Entities/Models/SlugHistoryFactory.php | database/factories/Entities/Models/SlugHistoryFactory.php | <?php
namespace Database\Factories\Entities\Models;
use BookStack\Entities\Models\Book;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\BookStack\Entities\Models\SlugHistory>
*/
class SlugHistoryFactory extends Factory
{
protected $model = \Bo... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/factories/Entities/Models/BookshelfFactory.php | database/factories/Entities/Models/BookshelfFactory.php | <?php
namespace Database\Factories\Entities\Models;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
class BookshelfFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = \BookStack\Entities\Model... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/factories/Entities/Models/ChapterFactory.php | database/factories/Entities/Models/ChapterFactory.php | <?php
namespace Database\Factories\Entities\Models;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
class ChapterFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = \BookStack\Entities\Models\... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/factories/Entities/Models/DeletionFactory.php | database/factories/Entities/Models/DeletionFactory.php | <?php
namespace Database\Factories\Entities\Models;
use BookStack\Entities\Models\Page;
use BookStack\Users\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\BookStack\Entities\Models\Deletion>
*/
class DeletionFactory extends Factory
{... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/factories/Entities/Models/PageFactory.php | database/factories/Entities/Models/PageFactory.php | <?php
namespace Database\Factories\Entities\Models;
use BookStack\Entities\Tools\PageEditorType;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
class PageFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
prot... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/factories/Entities/Models/BookFactory.php | database/factories/Entities/Models/BookFactory.php | <?php
namespace Database\Factories\Entities\Models;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
class BookFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = \BookStack\Entities\Models\Boo... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/factories/Entities/Models/PageRevisionFactory.php | database/factories/Entities/Models/PageRevisionFactory.php | <?php
namespace Database\Factories\Entities\Models;
use BookStack\Entities\Models\Page;
use BookStack\Users\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
class PageRevisionFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/factories/Access/SocialAccountFactory.php | database/factories/Access/SocialAccountFactory.php | <?php
namespace Database\Factories\Access;
use BookStack\Users\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\BookStack\Access\SocialAccount>
*/
class SocialAccountFactory extends Factory
{
protected $model = \BookStack\Access\So... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/factories/Access/Mfa/MfaValueFactory.php | database/factories/Access/Mfa/MfaValueFactory.php | <?php
namespace Database\Factories\Access\Mfa;
use BookStack\Users\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\BookStack\Access\Mfa\MfaValue>
*/
class MfaValueFactory extends Factory
{
protected $model = \BookStack\Access\Mfa\... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/factories/Api/ApiTokenFactory.php | database/factories/Api/ApiTokenFactory.php | <?php
namespace Database\Factories\Api;
use BookStack\Api\ApiToken;
use BookStack\Users\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Carbon;
use Illuminate\Support\Str;
class ApiTokenFactory extends Factory
{
protected $model = ApiToken::class;
public function defi... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/factories/Exports/ImportFactory.php | database/factories/Exports/ImportFactory.php | <?php
namespace Database\Factories\Exports;
use BookStack\Users\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
class ImportFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = \Bo... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/factories/Sorting/SortRuleFactory.php | database/factories/Sorting/SortRuleFactory.php | <?php
namespace Database\Factories\Sorting;
use BookStack\Sorting\SortRule;
use BookStack\Sorting\SortRuleOperation;
use Illuminate\Database\Eloquent\Factories\Factory;
class SortRuleFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protecte... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2024_02_04_141358_add_views_updated_index.php | database/migrations/2024_02_04_141358_add_views_updated_index.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('views', function (Blueprint $table) {
... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2023_07_25_124945_add_receive_notifications_role_permissions.php | database/migrations/2023_07_25_124945_add_receive_notifications_role_permissions.php | <?php
use Carbon\Carbon;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
// Create new receive-notifications permission and assign to admin role
$permis... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2021_09_26_044614_add_activities_ip_column.php | database/migrations/2021_09_26_044614_add_activities_ip_column.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('activities', function (Blueprint $table) {
... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2015_09_05_164707_add_email_confirmation_table.php | database/migrations/2015_09_05_164707_add_email_confirmation_table.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('users', function (Blueprint $table) {
... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2021_01_30_225441_add_settings_type_column.php | database/migrations/2021_01_30_225441_add_settings_type_column.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('settings', function (Blueprint $table) {
... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2020_09_27_210528_create_deletions_table.php | database/migrations/2020_09_27_210528_create_deletions_table.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('deletions', function (Blueprint $table) {
... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2015_08_09_093534_create_page_revisions_table.php | database/migrations/2015_08_09_093534_create_page_revisions_table.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('page_revisions', function (Blueprint $table)... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2025_10_22_134507_update_comments_relation_field_names.php | database/migrations/2025_10_22_134507_update_comments_relation_field_names.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('comments', function (Blueprint $table) {
... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2015_08_31_175240_add_search_indexes.php | database/migrations/2015_08_31_175240_add_search_indexes.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up()
{
// This was removed for v0.24 s... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2015_07_13_172121_create_images_table.php | database/migrations/2015_07_13_172121_create_images_table.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('images', function (Blueprint $table) {
... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2020_08_04_131052_remove_role_name_field.php | database/migrations/2020_08_04_131052_remove_role_name_field.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('roles', fu... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2017_01_21_163556_create_cache_table.php | database/migrations/2017_01_21_163556_create_cache_table.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('cache', function (Blueprint $table) {
... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2021_03_08_215138_add_user_slug.php | database/migrations/2021_03_08_215138_add_user_slug.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Str;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2024_01_01_104542_add_default_template_to_chapters.php | database/migrations/2024_01_01_104542_add_default_template_to_chapters.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddDefaultTemplateToChapters extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('chapters', function (Bluepr... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2016_07_07_181521_add_summary_to_page_revisions.php | database/migrations/2016_07_07_181521_add_summary_to_page_revisions.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('page_revisions', function ($table) {
$table->string('summary')->nullable();... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2025_09_15_132850_create_entities_table.php | database/migrations/2025_09_15_132850_create_entities_table.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('entities', function (Blueprint $table) {
... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2023_02_23_200227_add_updated_at_index_to_pages.php | database/migrations/2023_02_23_200227_add_updated_at_index_to_pages.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('pages', function (Blueprint $table) {
... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2015_07_12_114933_create_books_table.php | database/migrations/2015_07_12_114933_create_books_table.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('books', function (Blueprint $table) {
... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2015_07_27_172342_create_chapters_table.php | database/migrations/2015_07_27_172342_create_chapters_table.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('chapters', function (Blueprint $table) {
... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2019_12_29_120917_add_api_auth.php | database/migrations/2019_12_29_120917_add_api_auth.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2022_04_25_140741_update_polymorphic_types.php | database/migrations/2022_04_25_140741_update_polymorphic_types.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;
return new class extends Migration
{
/**
* Mapping of old polymorphic types to new simpler values.
*/
protected array $changeMap = [
'BookStack\\Bookshelf' => 'bookshelf',
'BookStack\\Book' =>... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2023_12_17_140913_add_description_html_to_entities.php | database/migrations/2023_12_17_140913_add_description_html_to_entities.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
$addColumn = fn(Blueprint $table) => $table->text('descripti... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2025_09_15_134813_drop_old_entity_tables.php | database/migrations/2025_09_15_134813_drop_old_entity_tables.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Query\JoinClause;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::dropIfExis... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2017_08_29_102650_add_cover_image_display.php | database/migrations/2017_08_29_102650_add_cover_image_display.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('books', function (Blueprint $table) {
... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2015_08_08_200447_add_users_to_entities.php | database/migrations/2015_08_08_200447_add_users_to_entities.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('pages', function (Blueprint $table) {
... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2025_12_15_140219_create_mention_history_table.php | database/migrations/2025_12_15_140219_create_mention_history_table.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('mention_history', function (Blueprint $table... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2017_07_02_152834_update_db_encoding_to_ut8mb4.php | database/migrations/2017_07_02_152834_update_db_encoding_to_ut8mb4.php | <?php
use Illuminate\Database\Migrations\Migration;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up()
{
// Migration removed due to issues during live migration.
// Instead you can run the command `artisan bookstack:db-utf8mb4`
// whic... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2025_12_19_103417_add_views_viewable_type_index.php | database/migrations/2025_12_19_103417_add_views_viewable_type_index.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('views', function (Blueprint $table) {
... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2017_08_01_130541_create_comments_table.php | database/migrations/2017_08_01_130541_create_comments_table.php | <?php
use Carbon\Carbon;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2025_01_29_180933_create_sort_rules_table.php | database/migrations/2025_01_29_180933_create_sort_rules_table.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('sort_rules', function (Blueprint $table) {
... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2023_07_31_104430_create_watches_table.php | database/migrations/2023_07_31_104430_create_watches_table.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('watches', function (Blueprint $table) {
... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2014_10_12_000000_create_users_table.php | database/migrations/2014_10_12_000000_create_users_table.php | <?php
use Carbon\Carbon;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2022_01_03_154041_add_webhooks_timeout_error_columns.php | database/migrations/2022_01_03_154041_add_webhooks_timeout_error_columns.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('webhooks', function (Blueprint $table) {
... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2023_08_21_174248_increase_cache_size.php | database/migrations/2023_08_21_174248_increase_cache_size.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('cache', function (Blueprint $table) {
... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2015_11_21_145609_create_views_table.php | database/migrations/2015_11_21_145609_create_views_table.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('views', function (Blueprint $table) {
... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2018_08_04_115700_create_bookshelves_table.php | database/migrations/2018_08_04_115700_create_bookshelves_table.php | <?php
use Carbon\Carbon;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
// Co... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2016_03_13_082138_add_page_drafts.php | database/migrations/2016_03_13_082138_add_page_drafts.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('pages', function (Blueprint $table) {
... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2016_03_09_203143_add_page_revision_types.php | database/migrations/2016_03_09_203143_add_page_revision_types.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('page_revisions', function (Blueprint $table) ... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2024_09_29_140340_ensure_editor_value_set.php | database/migrations/2024_09_29_140340_ensure_editor_value_set.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
// Ensure we have an "editor" value set for pages
// Get default
$default = DB::table('se... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2015_09_04_165821_create_social_accounts_table.php | database/migrations/2015_09_04_165821_create_social_accounts_table.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('social_accounts', function (Blueprint $table... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2016_04_09_100730_add_view_permissions_to_roles.php | database/migrations/2016_04_09_100730_add_view_permissions_to_roles.php | <?php
use Carbon\Carbon;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
$currentRoles = DB::table('roles')->get();
// Create new view permission
... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2015_08_30_125859_create_settings_table.php | database/migrations/2015_08_30_125859_create_settings_table.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('settings', function (Blueprint $table) {
... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2014_10_12_100000_create_password_resets_table.php | database/migrations/2014_10_12_100000_create_password_resets_table.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('password_resets', function (Blueprint $table... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2015_12_07_195238_add_image_upload_types.php | database/migrations/2015_12_07_195238_add_image_upload_types.php | <?php
use BookStack\Uploads\Image;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('images', functio... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2016_01_11_210908_add_external_auth_to_users.php | database/migrations/2016_01_11_210908_add_external_auth_to_users.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('users', function (Blueprint $table) {
... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2025_11_23_161812_create_slug_history_table.php | database/migrations/2025_11_23_161812_create_slug_history_table.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
// Create the table for s... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2023_01_24_104625_refactor_joint_permissions_storage.php | database/migrations/2023_01_24_104625_refactor_joint_permissions_storage.php | <?php
use BookStack\Permissions\JointPermissionBuilder;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function ... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2020_09_27_210059_add_entity_soft_deletes.php | database/migrations/2020_09_27_210059_add_entity_soft_deletes.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('bookshelves', function (Blueprint $table) {
... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2016_04_20_192649_create_joint_permissions_table.php | database/migrations/2016_04_20_192649_create_joint_permissions_table.php | <?php
use Carbon\Carbon;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Str;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2015_08_29_105422_add_roles_and_permissions.php | database/migrations/2015_08_29_105422_add_roles_and_permissions.php | <?php
/**
* Much of this code has been taken from entrust,
* a role & permission management solution for Laravel.
*
* Full attribution of the database Schema shown below goes to the entrust project.
*
* @license MIT
* @url https://github.com/Zizaco/entrust
*/
use Carbon\Carbon;
use Illuminate\Database\Migrati... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
BookStackApp/BookStack | https://github.com/BookStackApp/BookStack/blob/e6b754fad029d6c35e139b907d04e6510775997b/database/migrations/2022_10_08_104202_drop_entity_restricted_field.php | database/migrations/2022_10_08_104202_drop_entity_restricted_field.php | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Query\Builder;
use Illuminate\Database\Query\JoinClause;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migration... | php | MIT | e6b754fad029d6c35e139b907d04e6510775997b | 2026-01-04T15:02:34.418809Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.