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:
parent
df583bc791
commit
bcfd71eb06
1 changed files with 8 additions and 0 deletions
|
@ -96,6 +96,10 @@ impl MigrationTrait for Migration {
|
||||||
.create_index(Index::create().name("index-relations-following").table(Relations::Table).col(Relations::Following).to_owned())
|
.create_index(Index::create().name("index-relations-following").table(Relations::Table).col(Relations::Following).to_owned())
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
|
manager
|
||||||
|
.create_index(Index::create().name("index-relations-activity").table(Relations::Table).col(Relations::Activity).to_owned())
|
||||||
|
.await?;
|
||||||
|
|
||||||
manager
|
manager
|
||||||
.create_table(
|
.create_table(
|
||||||
Table::create()
|
Table::create()
|
||||||
|
@ -209,6 +213,10 @@ impl MigrationTrait for Migration {
|
||||||
.drop_index(Index::drop().name("index-relations-following").table(Relations::Table).to_owned())
|
.drop_index(Index::drop().name("index-relations-following").table(Relations::Table).to_owned())
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
|
manager
|
||||||
|
.drop_index(Index::drop().name("index-relations-activity").table(Relations::Table).to_owned())
|
||||||
|
.await?;
|
||||||
|
|
||||||
manager
|
manager
|
||||||
.drop_table(Table::drop().table(Likes::Table).to_owned())
|
.drop_table(Table::drop().table(Likes::Table).to_owned())
|
||||||
.await?;
|
.await?;
|
||||||
|
|
Loading…
Reference in a new issue