From 7d1bd9c2bbb998e3ecc093a4f620de9c8f517ce0 Mon Sep 17 00:00:00 2001 From: alemi Date: Tue, 28 May 2024 02:08:09 +0200 Subject: [PATCH] fix!: unique username+domain, not just username oops i did it again redo your db --- ...40524_000001_create_actor_activity_object_tables.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/migrations/m20240524_000001_create_actor_activity_object_tables.rs b/src/migrations/m20240524_000001_create_actor_activity_object_tables.rs index a7143afc..72cd8061 100644 --- a/src/migrations/m20240524_000001_create_actor_activity_object_tables.rs +++ b/src/migrations/m20240524_000001_create_actor_activity_object_tables.rs @@ -170,7 +170,15 @@ impl MigrationTrait for Migration { .await?; manager - .create_index(Index::create().unique().name("index-actors-preferred-username").table(Actors::Table).col(Actors::PreferredUsername).to_owned()) + .create_index( + Index::create() + .unique() + .name("index-actors-preferred-username-domain") + .table(Actors::Table) + .col(Actors::PreferredUsername) + .col(Actors::Domain) + .to_owned() + ) .await?; manager