diff --git a/app/Models/ProfileAlias.php b/app/Models/ProfileAlias.php new file mode 100644 index 000000000..b7a3bdc9c --- /dev/null +++ b/app/Models/ProfileAlias.php @@ -0,0 +1,17 @@ +belongsTo(Profile::class); + } +} diff --git a/database/migrations/2023_08_07_021252_create_profile_aliases_table.php b/database/migrations/2023_08_07_021252_create_profile_aliases_table.php new file mode 100644 index 000000000..ed9ab6ada --- /dev/null +++ b/database/migrations/2023_08_07_021252_create_profile_aliases_table.php @@ -0,0 +1,32 @@ +id(); + $table->unsignedBigInteger('profile_id')->nullable()->index(); + $table->string('acct')->nullable(); + $table->string('uri')->nullable(); + $table->foreign('profile_id')->references('id')->on('profiles'); + $table->unique(['profile_id', 'acct'], 'profile_id_acct_unique'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('profile_aliases'); + } +};