Refresh
This commit is contained in:
2
database/.gitignore
vendored
Executable file
2
database/.gitignore
vendored
Executable file
@@ -0,0 +1,2 @@
|
||||
*.sqlite
|
||||
*.sqlite-journal
|
||||
28
database/factories/UserFactory.php
Executable file
28
database/factories/UserFactory.php
Executable file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
/** @var \Illuminate\Database\Eloquent\Factory $factory */
|
||||
|
||||
use App\User;
|
||||
use Faker\Generator as Faker;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Model Factories
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This directory should contain each of the model factory definitions for
|
||||
| your application. Factories provide a convenient way to generate new
|
||||
| model instances for testing / seeding your application's database.
|
||||
|
|
||||
*/
|
||||
|
||||
$factory->define(User::class, function (Faker $faker) {
|
||||
return [
|
||||
'name' => $faker->name,
|
||||
'email' => $faker->unique()->safeEmail,
|
||||
'email_verified_at' => now(),
|
||||
'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
|
||||
'remember_token' => Str::random(10),
|
||||
];
|
||||
});
|
||||
36
database/migrations/2014_10_12_000000_create_users_table.php
Executable file
36
database/migrations/2014_10_12_000000_create_users_table.php
Executable file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateUsersTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('users', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('email')->unique();
|
||||
$table->timestamp('email_verified_at')->nullable();
|
||||
$table->string('password');
|
||||
$table->rememberToken();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('users');
|
||||
}
|
||||
}
|
||||
32
database/migrations/2014_10_12_100000_create_password_resets_table.php
Executable file
32
database/migrations/2014_10_12_100000_create_password_resets_table.php
Executable file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreatePasswordResetsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('password_resets', function (Blueprint $table) {
|
||||
$table->string('email')->index();
|
||||
$table->string('token');
|
||||
$table->timestamp('created_at')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('password_resets');
|
||||
}
|
||||
}
|
||||
36
database/migrations/2019_08_19_000000_create_failed_jobs_table.php
Executable file
36
database/migrations/2019_08_19_000000_create_failed_jobs_table.php
Executable file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateFailedJobsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('failed_jobs', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('uuid')->unique();
|
||||
$table->text('connection');
|
||||
$table->text('queue');
|
||||
$table->longText('payload');
|
||||
$table->longText('exception');
|
||||
$table->timestamp('failed_at')->useCurrent();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('failed_jobs');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreatePersonalAccessTokensTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('personal_access_tokens', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->morphs('tokenable');
|
||||
$table->string('name');
|
||||
$table->string('token', 64)->unique();
|
||||
$table->text('abilities')->nullable();
|
||||
$table->timestamp('last_used_at')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('personal_access_tokens');
|
||||
}
|
||||
}
|
||||
36
database/migrations/2021_08_15_193704_create_bookmarks_table.php
Executable file
36
database/migrations/2021_08_15_193704_create_bookmarks_table.php
Executable file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateBookmarksTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('bookmarks', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->text('initial_url');
|
||||
$table->unsignedBigInteger('folder_id')->index('bookmarks_folder_id_foreign');
|
||||
$table->unsignedBigInteger('document_id')->index('bookmarks_document_id_foreign');
|
||||
$table->unsignedBigInteger('visits')->default(0);
|
||||
$table->timestamps();
|
||||
$table->string('custom_title')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('bookmarks');
|
||||
}
|
||||
}
|
||||
32
database/migrations/2021_08_15_193704_create_cache_table.php
Executable file
32
database/migrations/2021_08_15_193704_create_cache_table.php
Executable file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateCacheTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('cache', function (Blueprint $table) {
|
||||
$table->string('key')->unique();
|
||||
$table->mediumText('value');
|
||||
$table->integer('expiration');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('cache');
|
||||
}
|
||||
}
|
||||
32
database/migrations/2021_08_15_193704_create_document_feeds_table.php
Executable file
32
database/migrations/2021_08_15_193704_create_document_feeds_table.php
Executable file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateDocumentFeedsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('document_feeds', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->unsignedBigInteger('document_id')->index('document_feeds_document_id_foreign');
|
||||
$table->unsignedBigInteger('feed_id')->index('document_feeds_feed_id_foreign');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('document_feeds');
|
||||
}
|
||||
}
|
||||
40
database/migrations/2021_08_15_193704_create_documents_table.php
Executable file
40
database/migrations/2021_08_15_193704_create_documents_table.php
Executable file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateDocumentsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('documents', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->text('url');
|
||||
$table->string('mimetype')->nullable();
|
||||
$table->text('title')->nullable();
|
||||
$table->text('description')->nullable();
|
||||
$table->text('favicon_path')->nullable();
|
||||
$table->dateTime('checked_at')->nullable();
|
||||
$table->timestamps();
|
||||
$table->unsignedBigInteger('visits')->default(0);
|
||||
$table->unsignedSmallInteger('http_status_code')->default(0);
|
||||
$table->string('http_status_text')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('documents');
|
||||
}
|
||||
}
|
||||
36
database/migrations/2021_08_15_193704_create_failed_jobs_table.php
Executable file
36
database/migrations/2021_08_15_193704_create_failed_jobs_table.php
Executable file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateFailedJobsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('failed_jobs', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('uuid')->nullable()->unique();
|
||||
$table->text('connection');
|
||||
$table->text('queue');
|
||||
$table->longText('payload');
|
||||
$table->longText('exception');
|
||||
$table->timestamp('failed_at')->useCurrent();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('failed_jobs');
|
||||
}
|
||||
}
|
||||
32
database/migrations/2021_08_15_193704_create_feed_feed_items_table.php
Executable file
32
database/migrations/2021_08_15_193704_create_feed_feed_items_table.php
Executable file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateFeedFeedItemsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('feed_feed_items', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->unsignedBigInteger('feed_id')->index('feed_feed_items_feed_id_foreign');
|
||||
$table->unsignedBigInteger('feed_item_id')->index('feed_feed_items_feed_item_id_foreign');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('feed_feed_items');
|
||||
}
|
||||
}
|
||||
36
database/migrations/2021_08_15_193704_create_feed_item_states_table.php
Executable file
36
database/migrations/2021_08_15_193704_create_feed_item_states_table.php
Executable file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateFeedItemStatesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('feed_item_states', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->unsignedBigInteger('user_id')->index('feed_item_states_user_id_foreign');
|
||||
$table->unsignedBigInteger('document_id')->index('feed_item_states_document_id_foreign');
|
||||
$table->unsignedBigInteger('feed_id')->index('feed_item_states_feed_id_foreign');
|
||||
$table->unsignedBigInteger('feed_item_id')->index('feed_item_states_feed_item_id_foreign');
|
||||
$table->tinyInteger('is_read')->default(0);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('feed_item_states');
|
||||
}
|
||||
}
|
||||
37
database/migrations/2021_08_15_193704_create_feed_items_table.php
Executable file
37
database/migrations/2021_08_15_193704_create_feed_items_table.php
Executable file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateFeedItemsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('feed_items', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->text('url');
|
||||
$table->string('hash');
|
||||
$table->text('title');
|
||||
$table->longText('description')->nullable();
|
||||
$table->longText('content')->nullable();
|
||||
$table->dateTime('published_at');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('feed_items');
|
||||
}
|
||||
}
|
||||
37
database/migrations/2021_08_15_193704_create_feeds_table.php
Executable file
37
database/migrations/2021_08_15_193704_create_feeds_table.php
Executable file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateFeedsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('feeds', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->text('url');
|
||||
$table->text('error')->nullable();
|
||||
$table->text('title')->nullable();
|
||||
$table->text('description')->nullable();
|
||||
$table->text('favicon_path')->nullable();
|
||||
$table->dateTime('checked_at')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('feeds');
|
||||
}
|
||||
}
|
||||
37
database/migrations/2021_08_15_193704_create_folders_table.php
Executable file
37
database/migrations/2021_08_15_193704_create_folders_table.php
Executable file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateFoldersTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('folders', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->unsignedBigInteger('user_id')->index('folders_user_id_foreign');
|
||||
$table->unsignedBigInteger('parent_id')->nullable()->index('folders_parent_id_foreign');
|
||||
$table->string('type')->default('folder');
|
||||
$table->string('title');
|
||||
$table->unsignedTinyInteger('position')->default(255);
|
||||
$table->timestamps();
|
||||
$table->unsignedBigInteger('group_id')->index('folders_group_id_foreign');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('folders');
|
||||
}
|
||||
}
|
||||
36
database/migrations/2021_08_15_193704_create_groups_table.php
Executable file
36
database/migrations/2021_08_15_193704_create_groups_table.php
Executable file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateGroupsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('groups', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->unsignedBigInteger('user_id')->index('groups_user_id_foreign');
|
||||
$table->string('name');
|
||||
$table->string('description')->nullable();
|
||||
$table->tinyInteger('invite_only')->default(1);
|
||||
$table->tinyInteger('auto_accept_users')->default(0);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('groups');
|
||||
}
|
||||
}
|
||||
35
database/migrations/2021_08_15_193704_create_highlights_table.php
Executable file
35
database/migrations/2021_08_15_193704_create_highlights_table.php
Executable file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateHighlightsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('highlights', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->unsignedBigInteger('user_id')->index('highlights_user_id_foreign');
|
||||
$table->text('expression');
|
||||
$table->string('color', 7);
|
||||
$table->unsignedInteger('position')->default(0);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('highlights');
|
||||
}
|
||||
}
|
||||
32
database/migrations/2021_08_15_193704_create_ignored_feeds_table.php
Executable file
32
database/migrations/2021_08_15_193704_create_ignored_feeds_table.php
Executable file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateIgnoredFeedsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('ignored_feeds', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->unsignedBigInteger('user_id')->index('ignored_feeds_user_id_foreign');
|
||||
$table->unsignedBigInteger('feed_id')->index('ignored_feeds_feed_id_foreign');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('ignored_feeds');
|
||||
}
|
||||
}
|
||||
36
database/migrations/2021_08_15_193704_create_jobs_table.php
Executable file
36
database/migrations/2021_08_15_193704_create_jobs_table.php
Executable file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateJobsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('jobs', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('queue')->index();
|
||||
$table->longText('payload');
|
||||
$table->unsignedTinyInteger('attempts');
|
||||
$table->unsignedInteger('reserved_at')->nullable();
|
||||
$table->unsignedInteger('available_at');
|
||||
$table->unsignedInteger('created_at');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('jobs');
|
||||
}
|
||||
}
|
||||
37
database/migrations/2021_08_15_193704_create_notifications_table.php
Executable file
37
database/migrations/2021_08_15_193704_create_notifications_table.php
Executable file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateNotificationsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('notifications', function (Blueprint $table) {
|
||||
$table->char('id', 36)->primary();
|
||||
$table->string('type');
|
||||
$table->string('notifiable_type');
|
||||
$table->unsignedBigInteger('notifiable_id');
|
||||
$table->text('data');
|
||||
$table->timestamp('read_at')->nullable();
|
||||
$table->timestamps();
|
||||
$table->index(['notifiable_type', 'notifiable_id']);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('notifications');
|
||||
}
|
||||
}
|
||||
32
database/migrations/2021_08_15_193704_create_password_resets_table.php
Executable file
32
database/migrations/2021_08_15_193704_create_password_resets_table.php
Executable file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreatePasswordResetsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('password_resets', function (Blueprint $table) {
|
||||
$table->string('email')->index();
|
||||
$table->string('token');
|
||||
$table->timestamp('created_at')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('password_resets');
|
||||
}
|
||||
}
|
||||
38
database/migrations/2021_08_15_193704_create_permissions_table.php
Executable file
38
database/migrations/2021_08_15_193704_create_permissions_table.php
Executable file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreatePermissionsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('permissions', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->unsignedBigInteger('folder_id')->index('permissions_folder_id_foreign');
|
||||
$table->unsignedBigInteger('user_id')->nullable()->index('permissions_user_id_foreign');
|
||||
$table->tinyInteger('can_create_folder')->default(0);
|
||||
$table->tinyInteger('can_update_folder')->default(0);
|
||||
$table->tinyInteger('can_delete_folder')->default(0);
|
||||
$table->tinyInteger('can_create_document')->default(0);
|
||||
$table->tinyInteger('can_delete_document')->default(0);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('permissions');
|
||||
}
|
||||
}
|
||||
35
database/migrations/2021_08_15_193704_create_sessions_table.php
Executable file
35
database/migrations/2021_08_15_193704_create_sessions_table.php
Executable file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateSessionsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('sessions', function (Blueprint $table) {
|
||||
$table->string('id')->unique();
|
||||
$table->unsignedBigInteger('user_id')->nullable();
|
||||
$table->string('ip_address', 45)->nullable();
|
||||
$table->text('user_agent')->nullable();
|
||||
$table->text('payload');
|
||||
$table->integer('last_activity');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('sessions');
|
||||
}
|
||||
}
|
||||
35
database/migrations/2021_08_15_193704_create_user_groups_table.php
Executable file
35
database/migrations/2021_08_15_193704_create_user_groups_table.php
Executable file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateUserGroupsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('user_groups', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->unsignedBigInteger('user_id')->index('user_groups_user_id_foreign');
|
||||
$table->unsignedBigInteger('group_id')->index('user_groups_group_id_foreign');
|
||||
$table->enum('status', ['own', 'created', 'invited', 'accepted', 'rejected', 'left', 'joining']);
|
||||
$table->unsignedInteger('position')->default(0);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('user_groups');
|
||||
}
|
||||
}
|
||||
41
database/migrations/2021_08_15_193704_create_users_table.php
Executable file
41
database/migrations/2021_08_15_193704_create_users_table.php
Executable file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateUsersTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('users', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('name');
|
||||
$table->string('email')->unique();
|
||||
$table->timestamp('email_verified_at')->nullable();
|
||||
$table->string('password');
|
||||
$table->char('lang', 8)->default('en');
|
||||
$table->string('theme')->default('auto');
|
||||
$table->text('two_factor_secret')->nullable();
|
||||
$table->text('two_factor_recovery_codes')->nullable();
|
||||
$table->tinyInteger('is_admin')->default(0);
|
||||
$table->rememberToken();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('users');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateWebsocketsStatisticsEntriesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('websockets_statistics_entries', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('app_id');
|
||||
$table->integer('peak_connection_count');
|
||||
$table->integer('websocket_message_count');
|
||||
$table->integer('api_message_count');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('websockets_statistics_entries');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddForeignKeysToBookmarksTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('bookmarks', function (Blueprint $table) {
|
||||
$table->foreign('document_id')->references('id')->on('documents')->onDelete('CASCADE');
|
||||
$table->foreign('folder_id')->references('id')->on('folders')->onDelete('CASCADE');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('bookmarks', function (Blueprint $table) {
|
||||
$table->dropForeign('bookmarks_document_id_foreign');
|
||||
$table->dropForeign('bookmarks_folder_id_foreign');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddForeignKeysToDocumentFeedsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('document_feeds', function (Blueprint $table) {
|
||||
$table->foreign('document_id')->references('id')->on('documents')->onDelete('CASCADE');
|
||||
$table->foreign('feed_id')->references('id')->on('feeds')->onDelete('CASCADE');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('document_feeds', function (Blueprint $table) {
|
||||
$table->dropForeign('document_feeds_document_id_foreign');
|
||||
$table->dropForeign('document_feeds_feed_id_foreign');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddForeignKeysToFeedFeedItemsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('feed_feed_items', function (Blueprint $table) {
|
||||
$table->foreign('feed_id')->references('id')->on('feeds')->onDelete('CASCADE');
|
||||
$table->foreign('feed_item_id')->references('id')->on('feed_items')->onDelete('CASCADE');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('feed_feed_items', function (Blueprint $table) {
|
||||
$table->dropForeign('feed_feed_items_feed_id_foreign');
|
||||
$table->dropForeign('feed_feed_items_feed_item_id_foreign');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddForeignKeysToFeedItemStatesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('feed_item_states', function (Blueprint $table) {
|
||||
$table->foreign('document_id')->references('id')->on('documents')->onDelete('CASCADE');
|
||||
$table->foreign('feed_id')->references('id')->on('feeds')->onDelete('CASCADE');
|
||||
$table->foreign('feed_item_id')->references('id')->on('feed_items')->onDelete('CASCADE');
|
||||
$table->foreign('user_id')->references('id')->on('users')->onDelete('CASCADE');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('feed_item_states', function (Blueprint $table) {
|
||||
$table->dropForeign('feed_item_states_document_id_foreign');
|
||||
$table->dropForeign('feed_item_states_feed_id_foreign');
|
||||
$table->dropForeign('feed_item_states_feed_item_id_foreign');
|
||||
$table->dropForeign('feed_item_states_user_id_foreign');
|
||||
});
|
||||
}
|
||||
}
|
||||
36
database/migrations/2021_08_15_193705_add_foreign_keys_to_folders_table.php
Executable file
36
database/migrations/2021_08_15_193705_add_foreign_keys_to_folders_table.php
Executable file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddForeignKeysToFoldersTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('folders', function (Blueprint $table) {
|
||||
$table->foreign('group_id')->references('id')->on('groups')->onDelete('CASCADE');
|
||||
$table->foreign('parent_id')->references('id')->on('folders')->onDelete('CASCADE');
|
||||
$table->foreign('user_id')->references('id')->on('users')->onDelete('CASCADE');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('folders', function (Blueprint $table) {
|
||||
$table->dropForeign('folders_group_id_foreign');
|
||||
$table->dropForeign('folders_parent_id_foreign');
|
||||
$table->dropForeign('folders_user_id_foreign');
|
||||
});
|
||||
}
|
||||
}
|
||||
32
database/migrations/2021_08_15_193705_add_foreign_keys_to_groups_table.php
Executable file
32
database/migrations/2021_08_15_193705_add_foreign_keys_to_groups_table.php
Executable file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddForeignKeysToGroupsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('groups', function (Blueprint $table) {
|
||||
$table->foreign('user_id')->references('id')->on('users')->onDelete('CASCADE');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('groups', function (Blueprint $table) {
|
||||
$table->dropForeign('groups_user_id_foreign');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddForeignKeysToHighlightsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('highlights', function (Blueprint $table) {
|
||||
$table->foreign('user_id')->references('id')->on('users')->onDelete('CASCADE');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('highlights', function (Blueprint $table) {
|
||||
$table->dropForeign('highlights_user_id_foreign');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddForeignKeysToIgnoredFeedsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('ignored_feeds', function (Blueprint $table) {
|
||||
$table->foreign('feed_id')->references('id')->on('feeds')->onDelete('CASCADE');
|
||||
$table->foreign('user_id')->references('id')->on('users')->onDelete('CASCADE');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('ignored_feeds', function (Blueprint $table) {
|
||||
$table->dropForeign('ignored_feeds_feed_id_foreign');
|
||||
$table->dropForeign('ignored_feeds_user_id_foreign');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddForeignKeysToPermissionsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('permissions', function (Blueprint $table) {
|
||||
$table->foreign('folder_id')->references('id')->on('folders')->onDelete('CASCADE');
|
||||
$table->foreign('user_id')->references('id')->on('users')->onDelete('CASCADE');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('permissions', function (Blueprint $table) {
|
||||
$table->dropForeign('permissions_folder_id_foreign');
|
||||
$table->dropForeign('permissions_user_id_foreign');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddForeignKeysToUserGroupsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('user_groups', function (Blueprint $table) {
|
||||
$table->foreign('group_id')->references('id')->on('groups')->onDelete('CASCADE');
|
||||
$table->foreign('user_id')->references('id')->on('users')->onDelete('CASCADE');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('user_groups', function (Blueprint $table) {
|
||||
$table->dropForeign('user_groups_group_id_foreign');
|
||||
$table->dropForeign('user_groups_user_id_foreign');
|
||||
});
|
||||
}
|
||||
}
|
||||
400
database/schema/mysql-schema.dump
Executable file
400
database/schema/mysql-schema.dump
Executable file
@@ -0,0 +1,400 @@
|
||||
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
||||
/*!40103 SET TIME_ZONE='+00:00' */;
|
||||
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||
DROP TABLE IF EXISTS `bookmarks`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `bookmarks` (
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`initial_url` text COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`folder_id` bigint(20) unsigned NOT NULL,
|
||||
`document_id` bigint(20) unsigned NOT NULL,
|
||||
`visits` bigint(20) unsigned NOT NULL DEFAULT 0,
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `bookmarks_folder_id_foreign` (`folder_id`),
|
||||
KEY `bookmarks_document_id_foreign` (`document_id`),
|
||||
CONSTRAINT `bookmarks_document_id_foreign` FOREIGN KEY (`document_id`) REFERENCES `documents` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `bookmarks_folder_id_foreign` FOREIGN KEY (`folder_id`) REFERENCES `folders` (`id`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
DROP TABLE IF EXISTS `cache`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `cache` (
|
||||
`key` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`value` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`expiration` int(11) NOT NULL,
|
||||
UNIQUE KEY `cache_key_unique` (`key`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
DROP TABLE IF EXISTS `document_feeds`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `document_feeds` (
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`document_id` bigint(20) unsigned NOT NULL,
|
||||
`feed_id` bigint(20) unsigned NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `document_feeds_document_id_foreign` (`document_id`),
|
||||
KEY `document_feeds_feed_id_foreign` (`feed_id`),
|
||||
CONSTRAINT `document_feeds_document_id_foreign` FOREIGN KEY (`document_id`) REFERENCES `documents` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `document_feeds_feed_id_foreign` FOREIGN KEY (`feed_id`) REFERENCES `feeds` (`id`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
DROP TABLE IF EXISTS `documents`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `documents` (
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`url` text COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`http_status_code` smallint(5) unsigned DEFAULT NULL,
|
||||
`mimetype` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`title` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`description` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`favicon_path` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`checked_at` datetime DEFAULT NULL,
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
`visits` bigint(20) unsigned NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
DROP TABLE IF EXISTS `failed_jobs`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `failed_jobs` (
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`uuid` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`connection` text COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`queue` text COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`failed_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
DROP TABLE IF EXISTS `feed_feed_items`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `feed_feed_items` (
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`feed_id` bigint(20) unsigned NOT NULL,
|
||||
`feed_item_id` bigint(20) unsigned NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `feed_feed_items_feed_id_foreign` (`feed_id`),
|
||||
KEY `feed_feed_items_feed_item_id_foreign` (`feed_item_id`),
|
||||
CONSTRAINT `feed_feed_items_feed_id_foreign` FOREIGN KEY (`feed_id`) REFERENCES `feeds` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `feed_feed_items_feed_item_id_foreign` FOREIGN KEY (`feed_item_id`) REFERENCES `feed_items` (`id`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
DROP TABLE IF EXISTS `feed_item_states`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `feed_item_states` (
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`user_id` bigint(20) unsigned NOT NULL,
|
||||
`document_id` bigint(20) unsigned NOT NULL,
|
||||
`feed_id` bigint(20) unsigned NOT NULL,
|
||||
`feed_item_id` bigint(20) unsigned NOT NULL,
|
||||
`is_read` tinyint(1) NOT NULL DEFAULT 0,
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `feed_item_states_user_id_foreign` (`user_id`),
|
||||
KEY `feed_item_states_document_id_foreign` (`document_id`),
|
||||
KEY `feed_item_states_feed_id_foreign` (`feed_id`),
|
||||
KEY `feed_item_states_feed_item_id_foreign` (`feed_item_id`),
|
||||
CONSTRAINT `feed_item_states_document_id_foreign` FOREIGN KEY (`document_id`) REFERENCES `documents` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `feed_item_states_feed_id_foreign` FOREIGN KEY (`feed_id`) REFERENCES `feeds` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `feed_item_states_feed_item_id_foreign` FOREIGN KEY (`feed_item_id`) REFERENCES `feed_items` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `feed_item_states_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
DROP TABLE IF EXISTS `feed_items`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `feed_items` (
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`url` text COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`hash` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`title` text COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`description` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`content` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`published_at` datetime NOT NULL,
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
DROP TABLE IF EXISTS `feeds`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `feeds` (
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`url` text COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`error` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`title` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`description` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`favicon_path` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`checked_at` datetime DEFAULT NULL,
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
DROP TABLE IF EXISTS `folders`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `folders` (
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`user_id` bigint(20) unsigned NOT NULL,
|
||||
`parent_id` bigint(20) unsigned DEFAULT NULL,
|
||||
`type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'folder',
|
||||
`title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`position` tinyint(3) unsigned NOT NULL DEFAULT 255,
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
`group_id` bigint(20) unsigned NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `folders_user_id_foreign` (`user_id`),
|
||||
KEY `folders_parent_id_foreign` (`parent_id`),
|
||||
KEY `folders_group_id_foreign` (`group_id`),
|
||||
CONSTRAINT `folders_group_id_foreign` FOREIGN KEY (`group_id`) REFERENCES `groups` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `folders_parent_id_foreign` FOREIGN KEY (`parent_id`) REFERENCES `folders` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `folders_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
DROP TABLE IF EXISTS `groups`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `groups` (
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`user_id` bigint(20) unsigned NOT NULL,
|
||||
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`description` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`invite_only` tinyint(1) NOT NULL DEFAULT 1,
|
||||
`auto_accept_users` tinyint(1) NOT NULL DEFAULT 0,
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `groups_user_id_foreign` (`user_id`),
|
||||
CONSTRAINT `groups_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
DROP TABLE IF EXISTS `highlights`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `highlights` (
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`user_id` bigint(20) unsigned NOT NULL,
|
||||
`expression` text COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`color` varchar(7) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`position` int(10) unsigned NOT NULL DEFAULT 0,
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `highlights_user_id_foreign` (`user_id`),
|
||||
CONSTRAINT `highlights_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
DROP TABLE IF EXISTS `ignored_feeds`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `ignored_feeds` (
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`user_id` bigint(20) unsigned NOT NULL,
|
||||
`feed_id` bigint(20) unsigned NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `ignored_feeds_user_id_foreign` (`user_id`),
|
||||
KEY `ignored_feeds_feed_id_foreign` (`feed_id`),
|
||||
CONSTRAINT `ignored_feeds_feed_id_foreign` FOREIGN KEY (`feed_id`) REFERENCES `feeds` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `ignored_feeds_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
DROP TABLE IF EXISTS `jobs`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `jobs` (
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`queue` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`attempts` tinyint(3) unsigned NOT NULL,
|
||||
`reserved_at` int(10) unsigned DEFAULT NULL,
|
||||
`available_at` int(10) unsigned NOT NULL,
|
||||
`created_at` int(10) unsigned NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `jobs_queue_index` (`queue`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
DROP TABLE IF EXISTS `migrations`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `migrations` (
|
||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`batch` int(11) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
DROP TABLE IF EXISTS `notifications`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `notifications` (
|
||||
`id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`notifiable_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`notifiable_id` bigint(20) unsigned NOT NULL,
|
||||
`data` text COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`read_at` timestamp NULL DEFAULT NULL,
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `notifications_notifiable_type_notifiable_id_index` (`notifiable_type`,`notifiable_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
DROP TABLE IF EXISTS `password_resets`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `password_resets` (
|
||||
`email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`token` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
KEY `password_resets_email_index` (`email`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
DROP TABLE IF EXISTS `permissions`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `permissions` (
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`folder_id` bigint(20) unsigned NOT NULL,
|
||||
`user_id` bigint(20) unsigned DEFAULT NULL,
|
||||
`can_create_folder` tinyint(1) NOT NULL DEFAULT 0,
|
||||
`can_update_folder` tinyint(1) NOT NULL DEFAULT 0,
|
||||
`can_delete_folder` tinyint(1) NOT NULL DEFAULT 0,
|
||||
`can_create_document` tinyint(1) NOT NULL DEFAULT 0,
|
||||
`can_delete_document` tinyint(1) NOT NULL DEFAULT 0,
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `permissions_folder_id_foreign` (`folder_id`),
|
||||
KEY `permissions_user_id_foreign` (`user_id`),
|
||||
CONSTRAINT `permissions_folder_id_foreign` FOREIGN KEY (`folder_id`) REFERENCES `folders` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `permissions_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
DROP TABLE IF EXISTS `sessions`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `sessions` (
|
||||
`id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`user_id` bigint(20) unsigned DEFAULT NULL,
|
||||
`ip_address` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`user_agent` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`payload` text COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`last_activity` int(11) NOT NULL,
|
||||
UNIQUE KEY `sessions_id_unique` (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
DROP TABLE IF EXISTS `user_groups`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `user_groups` (
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`user_id` bigint(20) unsigned NOT NULL,
|
||||
`group_id` bigint(20) unsigned NOT NULL,
|
||||
`status` enum('own','created','invited','accepted','rejected','left','joining') COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`position` int(10) unsigned NOT NULL DEFAULT 0,
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `user_groups_user_id_foreign` (`user_id`),
|
||||
KEY `user_groups_group_id_foreign` (`group_id`),
|
||||
CONSTRAINT `user_groups_group_id_foreign` FOREIGN KEY (`group_id`) REFERENCES `groups` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `user_groups_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
DROP TABLE IF EXISTS `users`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `users` (
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`email_verified_at` timestamp NULL DEFAULT NULL,
|
||||
`password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`lang` char(8) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'en',
|
||||
`theme` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'auto',
|
||||
`two_factor_secret` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`two_factor_recovery_codes` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`is_admin` tinyint(1) NOT NULL DEFAULT 0,
|
||||
`remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `users_email_unique` (`email`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
DROP TABLE IF EXISTS `websockets_statistics_entries`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `websockets_statistics_entries` (
|
||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`app_id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`peak_connection_count` int(11) NOT NULL,
|
||||
`websocket_message_count` int(11) NOT NULL,
|
||||
`api_message_count` int(11) NOT NULL,
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||
|
||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
INSERT INTO `migrations` VALUES (1,'0000_00_00_000000_create_websockets_statistics_entries_table',1);
|
||||
INSERT INTO `migrations` VALUES (2,'2014_10_12_000000_create_users_table',1);
|
||||
INSERT INTO `migrations` VALUES (3,'2014_10_12_100000_create_password_resets_table',1);
|
||||
INSERT INTO `migrations` VALUES (4,'2014_10_12_200000_add_two_factor_columns_to_users_table',1);
|
||||
INSERT INTO `migrations` VALUES (5,'2019_08_19_000000_create_failed_jobs_table',1);
|
||||
INSERT INTO `migrations` VALUES (6,'2020_08_19_194845_create_cache_table',1);
|
||||
INSERT INTO `migrations` VALUES (7,'2020_08_19_194901_create_notifications_table',1);
|
||||
INSERT INTO `migrations` VALUES (8,'2020_08_19_194910_create_jobs_table',1);
|
||||
INSERT INTO `migrations` VALUES (9,'2020_08_19_194916_create_sessions_table',1);
|
||||
INSERT INTO `migrations` VALUES (10,'2020_08_19_200056_create_folders_table',1);
|
||||
INSERT INTO `migrations` VALUES (11,'2020_08_24_155054_create_documents_table',1);
|
||||
INSERT INTO `migrations` VALUES (12,'2020_08_24_161356_create_bookmarks_table',1);
|
||||
INSERT INTO `migrations` VALUES (13,'2020_08_28_120922_create_feeds_table',1);
|
||||
INSERT INTO `migrations` VALUES (14,'2020_08_28_120929_create_feed_items_table',1);
|
||||
INSERT INTO `migrations` VALUES (15,'2020_08_28_121017_create_document_feeds_table',1);
|
||||
INSERT INTO `migrations` VALUES (16,'2020_08_28_123158_create_feed_feed_items_table',1);
|
||||
INSERT INTO `migrations` VALUES (17,'2020_09_02_215853_create_feed_item_states_table',1);
|
||||
INSERT INTO `migrations` VALUES (18,'2020_09_06_205232_create_ignored_feeds_table',1);
|
||||
INSERT INTO `migrations` VALUES (19,'2020_09_17_230935_update_foreign_keys',1);
|
||||
INSERT INTO `migrations` VALUES (20,'2020_09_23_201540_add_lang_to_users_table',1);
|
||||
INSERT INTO `migrations` VALUES (21,'2020_09_29_105715_add_theme_to_users_table',1);
|
||||
INSERT INTO `migrations` VALUES (22,'2020_10_09_221017_create_highlights_table',1);
|
||||
INSERT INTO `migrations` VALUES (23,'2020_10_20_124242_create_history_entries_table',1);
|
||||
INSERT INTO `migrations` VALUES (24,'2020_10_26_225349_add_morphed_object_to_history_entries_table',1);
|
||||
INSERT INTO `migrations` VALUES (25,'2020_10_26_231610_change_details_in_history_entries_table',1);
|
||||
INSERT INTO `migrations` VALUES (26,'2020_10_29_150159_create_groups_table',1);
|
||||
INSERT INTO `migrations` VALUES (27,'2020_10_29_150246_create_user_groups_table',1);
|
||||
INSERT INTO `migrations` VALUES (28,'2020_10_29_161727_add_group_in_folders_table',1);
|
||||
INSERT INTO `migrations` VALUES (29,'2020_10_29_161754_remove_status_fields_from_folders_table',1);
|
||||
INSERT INTO `migrations` VALUES (30,'2020_11_06_195542_add_visits_to_documents_table',1);
|
||||
INSERT INTO `migrations` VALUES (31,'2020_11_07_101418_remove_visits_from_bookmarks_table',1);
|
||||
INSERT INTO `migrations` VALUES (32,'2020_11_14_232426_remove_folder_id_from_feed_item_states_table',1);
|
||||
INSERT INTO `migrations` VALUES (33,'2020_11_17_212131_create_permissions_table',1);
|
||||
INSERT INTO `migrations` VALUES (34,'2020_11_20_093843_add_auto_accept_users_to_groups_table',1);
|
||||
INSERT INTO `migrations` VALUES (35,'2020_11_30_231123_change_theme_column_default',1);
|
||||
INSERT INTO `migrations` VALUES (36,'2020_12_01_111943_add_position_to_highlights_table',1);
|
||||
18
database/seeders/DatabaseSeeder.php
Executable file
18
database/seeders/DatabaseSeeder.php
Executable file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class DatabaseSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Seed the application's database.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
// \App\Models\User::factory(10)->create();
|
||||
}
|
||||
}
|
||||
18
database/seeds/DatabaseSeeder.php
Executable file
18
database/seeds/DatabaseSeeder.php
Executable file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class DatabaseSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Seed the application's database.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user