1
0
Fork 0
forked from alemi/upub

fix: index relations by activity too

since the only way to find them is via the activity that generated them
This commit is contained in:
əlemi 2024-05-26 18:41:27 +02:00
parent df583bc791
commit bcfd71eb06
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -96,6 +96,10 @@ impl MigrationTrait for Migration {
.create_index(Index::create().name("index-relations-following").table(Relations::Table).col(Relations::Following).to_owned())
.await?;
manager
.create_index(Index::create().name("index-relations-activity").table(Relations::Table).col(Relations::Activity).to_owned())
.await?;
manager
.create_table(
Table::create()
@ -209,6 +213,10 @@ impl MigrationTrait for Migration {
.drop_index(Index::drop().name("index-relations-following").table(Relations::Table).to_owned())
.await?;
manager
.drop_index(Index::drop().name("index-relations-activity").table(Relations::Table).to_owned())
.await?;
manager
.drop_table(Table::drop().table(Likes::Table).to_owned())
.await?;