diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/2014_10_12_000000_create_users_table.php index af911842..c249292b 100644 --- a/database/migrations/2014_10_12_000000_create_users_table.php +++ b/database/migrations/2014_10_12_000000_create_users_table.php @@ -14,7 +14,7 @@ class CreateUsersTable extends Migration public function up() { Schema::create('users', function (Blueprint $table) { - $table->increments('id'); + $table->bigIncrements('id'); $table->string('name')->nullable(); $table->string('username')->nullable()->unique()->index(); $table->string('email')->unique(); diff --git a/database/migrations/2018_04_16_000059_create_sessions_table.php b/database/migrations/2018_04_16_000059_create_sessions_table.php index c213297d..7d848f17 100644 --- a/database/migrations/2018_04_16_000059_create_sessions_table.php +++ b/database/migrations/2018_04_16_000059_create_sessions_table.php @@ -15,7 +15,7 @@ class CreateSessionsTable extends Migration { Schema::create('sessions', function (Blueprint $table) { $table->string('id')->unique(); - $table->unsignedInteger('user_id')->nullable(); + $table->bigInteger('user_id')->unsigned()->nullable(); $table->string('ip_address', 45)->nullable(); $table->text('user_agent')->nullable(); $table->text('payload'); diff --git a/database/migrations/2018_04_16_002611_create_profiles_table.php b/database/migrations/2018_04_16_002611_create_profiles_table.php index b469839e..598edddb 100644 --- a/database/migrations/2018_04_16_002611_create_profiles_table.php +++ b/database/migrations/2018_04_16_002611_create_profiles_table.php @@ -14,7 +14,7 @@ class CreateProfilesTable extends Migration public function up() { Schema::create('profiles', function (Blueprint $table) { - $table->increments('id'); + $table->bigIncrements('id'); $table->unsignedInteger('user_id')->nullable(); $table->string('domain')->nullable(); $table->string('username')->nullable()->index(); @@ -24,6 +24,8 @@ class CreateProfilesTable extends Migration $table->string('website')->nullable(); $table->text('keybase_proof')->nullable(); $table->boolean('is_private')->default(false); + // ActivityPub + $table->string('sharedInbox')->nullable()->index(); // PuSH/WebSub $table->string('verify_token')->nullable(); $table->string('secret')->nullable(); diff --git a/database/migrations/2018_04_16_005848_create_statuses_table.php b/database/migrations/2018_04_16_005848_create_statuses_table.php index 0d4163d1..b711df3b 100644 --- a/database/migrations/2018_04_16_005848_create_statuses_table.php +++ b/database/migrations/2018_04_16_005848_create_statuses_table.php @@ -14,10 +14,11 @@ class CreateStatusesTable extends Migration public function up() { Schema::create('statuses', function (Blueprint $table) { - $table->increments('id'); + $table->bigIncrements('id'); $table->string('uri')->nullable(); $table->string('caption')->nullable(); - $table->unsignedInteger('profile_id')->nullable(); + $table->text('rendered')->nullable(); + $table->bigInteger('profile_id')->unsigned()->nullable(); $table->bigInteger('in_reply_to_id')->unsigned()->nullable(); $table->bigInteger('reblog_of_id')->unsigned()->nullable(); $table->string('url')->nullable(); @@ -29,8 +30,9 @@ class CreateStatusesTable extends Migration $table->string('language')->nullable(); $table->bigInteger('conversation_id')->unsigned()->nullable(); $table->boolean('local')->default(true); - $table->bigInteger('application_id') + $table->bigInteger('application_id')->unsigned()->nullable(); $table->bigInteger('in_reply_to_profile_id')->unsigned()->nullable(); + $table->json('entities')->nullable(); $table->timestamps(); }); } diff --git a/database/migrations/2018_04_16_011918_create_media_table.php b/database/migrations/2018_04_16_011918_create_media_table.php index 606634f6..8c260248 100644 --- a/database/migrations/2018_04_16_011918_create_media_table.php +++ b/database/migrations/2018_04_16_011918_create_media_table.php @@ -15,14 +15,18 @@ class CreateMediaTable extends Migration { Schema::create('media', function (Blueprint $table) { $table->increments('id'); - $table->unsignedInteger('status_id')->nullable(); - $table->unsignedInteger('profile_id')->nullable(); - $table->unsignedInteger('user_id')->nullable(); + $table->bigInteger('status_id')->unsigned()->nullable(); + $table->bigInteger('profile_id')->unsigned()->nullable(); + $table->bigInteger('user_id')->unsigned()->nullable(); $table->string('media_path'); + $table->string('thumbnail_path')->nullable(); $table->string('cdn_url')->nullable(); + $table->string('optimized_url')->nullable(); + $table->string('thumbnail_url')->nullable(); $table->tinyInteger('order')->unsigned()->default(1); $table->string('mime')->nullable(); $table->unsignedInteger('size')->nullable(); + $table->string('orientation')->nullable(); $table->timestamp('processed_at')->nullable(); $table->unique(['status_id', 'media_path']); $table->timestamps();