mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 22:41:27 +00:00
Update migrations to use bigInts for profile, status, user
This commit is contained in:
parent
7eb45af38c
commit
92c0ef8a74
5 changed files with 17 additions and 9 deletions
|
@ -14,7 +14,7 @@ class CreateUsersTable extends Migration
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::create('users', function (Blueprint $table) {
|
Schema::create('users', function (Blueprint $table) {
|
||||||
$table->increments('id');
|
$table->bigIncrements('id');
|
||||||
$table->string('name')->nullable();
|
$table->string('name')->nullable();
|
||||||
$table->string('username')->nullable()->unique()->index();
|
$table->string('username')->nullable()->unique()->index();
|
||||||
$table->string('email')->unique();
|
$table->string('email')->unique();
|
||||||
|
|
|
@ -15,7 +15,7 @@ class CreateSessionsTable extends Migration
|
||||||
{
|
{
|
||||||
Schema::create('sessions', function (Blueprint $table) {
|
Schema::create('sessions', function (Blueprint $table) {
|
||||||
$table->string('id')->unique();
|
$table->string('id')->unique();
|
||||||
$table->unsignedInteger('user_id')->nullable();
|
$table->bigInteger('user_id')->unsigned()->nullable();
|
||||||
$table->string('ip_address', 45)->nullable();
|
$table->string('ip_address', 45)->nullable();
|
||||||
$table->text('user_agent')->nullable();
|
$table->text('user_agent')->nullable();
|
||||||
$table->text('payload');
|
$table->text('payload');
|
||||||
|
|
|
@ -14,7 +14,7 @@ class CreateProfilesTable extends Migration
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::create('profiles', function (Blueprint $table) {
|
Schema::create('profiles', function (Blueprint $table) {
|
||||||
$table->increments('id');
|
$table->bigIncrements('id');
|
||||||
$table->unsignedInteger('user_id')->nullable();
|
$table->unsignedInteger('user_id')->nullable();
|
||||||
$table->string('domain')->nullable();
|
$table->string('domain')->nullable();
|
||||||
$table->string('username')->nullable()->index();
|
$table->string('username')->nullable()->index();
|
||||||
|
@ -24,6 +24,8 @@ class CreateProfilesTable extends Migration
|
||||||
$table->string('website')->nullable();
|
$table->string('website')->nullable();
|
||||||
$table->text('keybase_proof')->nullable();
|
$table->text('keybase_proof')->nullable();
|
||||||
$table->boolean('is_private')->default(false);
|
$table->boolean('is_private')->default(false);
|
||||||
|
// ActivityPub
|
||||||
|
$table->string('sharedInbox')->nullable()->index();
|
||||||
// PuSH/WebSub
|
// PuSH/WebSub
|
||||||
$table->string('verify_token')->nullable();
|
$table->string('verify_token')->nullable();
|
||||||
$table->string('secret')->nullable();
|
$table->string('secret')->nullable();
|
||||||
|
|
|
@ -14,10 +14,11 @@ class CreateStatusesTable extends Migration
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::create('statuses', function (Blueprint $table) {
|
Schema::create('statuses', function (Blueprint $table) {
|
||||||
$table->increments('id');
|
$table->bigIncrements('id');
|
||||||
$table->string('uri')->nullable();
|
$table->string('uri')->nullable();
|
||||||
$table->string('caption')->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('in_reply_to_id')->unsigned()->nullable();
|
||||||
$table->bigInteger('reblog_of_id')->unsigned()->nullable();
|
$table->bigInteger('reblog_of_id')->unsigned()->nullable();
|
||||||
$table->string('url')->nullable();
|
$table->string('url')->nullable();
|
||||||
|
@ -29,8 +30,9 @@ class CreateStatusesTable extends Migration
|
||||||
$table->string('language')->nullable();
|
$table->string('language')->nullable();
|
||||||
$table->bigInteger('conversation_id')->unsigned()->nullable();
|
$table->bigInteger('conversation_id')->unsigned()->nullable();
|
||||||
$table->boolean('local')->default(true);
|
$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->bigInteger('in_reply_to_profile_id')->unsigned()->nullable();
|
||||||
|
$table->json('entities')->nullable();
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,14 +15,18 @@ class CreateMediaTable extends Migration
|
||||||
{
|
{
|
||||||
Schema::create('media', function (Blueprint $table) {
|
Schema::create('media', function (Blueprint $table) {
|
||||||
$table->increments('id');
|
$table->increments('id');
|
||||||
$table->unsignedInteger('status_id')->nullable();
|
$table->bigInteger('status_id')->unsigned()->nullable();
|
||||||
$table->unsignedInteger('profile_id')->nullable();
|
$table->bigInteger('profile_id')->unsigned()->nullable();
|
||||||
$table->unsignedInteger('user_id')->nullable();
|
$table->bigInteger('user_id')->unsigned()->nullable();
|
||||||
$table->string('media_path');
|
$table->string('media_path');
|
||||||
|
$table->string('thumbnail_path')->nullable();
|
||||||
$table->string('cdn_url')->nullable();
|
$table->string('cdn_url')->nullable();
|
||||||
|
$table->string('optimized_url')->nullable();
|
||||||
|
$table->string('thumbnail_url')->nullable();
|
||||||
$table->tinyInteger('order')->unsigned()->default(1);
|
$table->tinyInteger('order')->unsigned()->default(1);
|
||||||
$table->string('mime')->nullable();
|
$table->string('mime')->nullable();
|
||||||
$table->unsignedInteger('size')->nullable();
|
$table->unsignedInteger('size')->nullable();
|
||||||
|
$table->string('orientation')->nullable();
|
||||||
$table->timestamp('processed_at')->nullable();
|
$table->timestamp('processed_at')->nullable();
|
||||||
$table->unique(['status_id', 'media_path']);
|
$table->unique(['status_id', 'media_path']);
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
|
|
Loading…
Reference in a new issue