forked from alemi/upub
fix(migrations): indexes get dropped with tables
This commit is contained in:
parent
c83e1df110
commit
93666cea97
6 changed files with 0 additions and 150 deletions
|
@ -321,73 +321,18 @@ impl MigrationTrait for Migration {
|
||||||
.drop_table(Table::drop().table(Actors::Table).to_owned())
|
.drop_table(Table::drop().table(Actors::Table).to_owned())
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
manager
|
|
||||||
.drop_index(Index::drop().name("index-actors-id").table(Actors::Table).to_owned())
|
|
||||||
.await?;
|
|
||||||
|
|
||||||
manager
|
|
||||||
.drop_index(Index::drop().name("index-actors-preferred-username").table(Actors::Table).to_owned())
|
|
||||||
.await?;
|
|
||||||
|
|
||||||
manager
|
|
||||||
.drop_index(Index::drop().name("index-actors-domain").table(Actors::Table).to_owned())
|
|
||||||
.await?;
|
|
||||||
|
|
||||||
|
|
||||||
manager
|
manager
|
||||||
.drop_table(Table::drop().table(Activities::Table).to_owned())
|
.drop_table(Table::drop().table(Activities::Table).to_owned())
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
manager
|
|
||||||
.drop_index(Index::drop().name("index-activities-id").table(Activities::Table).to_owned())
|
|
||||||
.await?;
|
|
||||||
|
|
||||||
manager
|
|
||||||
.drop_index(Index::drop().name("index-activities-actor").table(Activities::Table).to_owned())
|
|
||||||
.await?;
|
|
||||||
|
|
||||||
manager
|
|
||||||
.drop_index(Index::drop().name("activities-object-index").table(Activities::Table).to_owned())
|
|
||||||
.await?;
|
|
||||||
|
|
||||||
manager
|
|
||||||
.drop_index(Index::drop().name("index-activities-published-descending").table(Activities::Table).to_owned())
|
|
||||||
.await?;
|
|
||||||
|
|
||||||
|
|
||||||
manager
|
manager
|
||||||
.drop_table(Table::drop().table(Objects::Table).to_owned())
|
.drop_table(Table::drop().table(Objects::Table).to_owned())
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
manager
|
|
||||||
.drop_index(Index::drop().name("index-objects-id").table(Objects::Table).to_owned())
|
|
||||||
.await?;
|
|
||||||
|
|
||||||
manager
|
|
||||||
.drop_index(Index::drop().name("index-objects-attributed-to").table(Objects::Table).to_owned())
|
|
||||||
.await?;
|
|
||||||
|
|
||||||
manager
|
|
||||||
.drop_index(Index::drop().name("index-objects-in-reply-to").table(Objects::Table).to_owned())
|
|
||||||
.await?;
|
|
||||||
|
|
||||||
manager
|
|
||||||
.drop_index(Index::drop().name("index-objects-content-text").table(Objects::Table).to_owned())
|
|
||||||
.await?;
|
|
||||||
|
|
||||||
manager
|
|
||||||
.drop_index(Index::drop().name("index-objects-context").table(Objects::Table).to_owned())
|
|
||||||
.await?;
|
|
||||||
|
|
||||||
|
|
||||||
manager
|
manager
|
||||||
.drop_table(Table::drop().table(Instances::Table).to_owned())
|
.drop_table(Table::drop().table(Instances::Table).to_owned())
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
manager
|
|
||||||
.drop_index(Index::drop().name("index-instances-domain").table(Instances::Table).to_owned())
|
|
||||||
.await?;
|
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -215,43 +215,14 @@ impl MigrationTrait for Migration {
|
||||||
.drop_table(Table::drop().table(Relations::Table).to_owned())
|
.drop_table(Table::drop().table(Relations::Table).to_owned())
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
manager
|
|
||||||
.drop_index(Index::drop().name("index-relations-follower").table(Relations::Table).to_owned())
|
|
||||||
.await?;
|
|
||||||
|
|
||||||
manager
|
|
||||||
.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
|
manager
|
||||||
.drop_table(Table::drop().table(Likes::Table).to_owned())
|
.drop_table(Table::drop().table(Likes::Table).to_owned())
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
manager
|
|
||||||
.drop_index(Index::drop().name("index-likes-actor").table(Likes::Table).to_owned())
|
|
||||||
.await?;
|
|
||||||
manager
|
|
||||||
.drop_index(Index::drop().name("index-likes-object").table(Likes::Table).to_owned())
|
|
||||||
.await?;
|
|
||||||
manager
|
|
||||||
.drop_index(Index::drop().name("index-likes-actor-object").table(Likes::Table).to_owned())
|
|
||||||
.await?;
|
|
||||||
|
|
||||||
manager
|
manager
|
||||||
.drop_table(Table::drop().table(Announces::Table).to_owned())
|
.drop_table(Table::drop().table(Announces::Table).to_owned())
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
manager
|
|
||||||
.drop_index(Index::drop().name("index-announces-actor").table(Announces::Table).to_owned())
|
|
||||||
.await?;
|
|
||||||
manager
|
|
||||||
.drop_index(Index::drop().name("index-announces-object").table(Announces::Table).to_owned())
|
|
||||||
.await?;
|
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -146,26 +146,14 @@ impl MigrationTrait for Migration {
|
||||||
.drop_table(Table::drop().table(Configs::Table).to_owned())
|
.drop_table(Table::drop().table(Configs::Table).to_owned())
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
manager
|
|
||||||
.drop_index(Index::drop().name("index-configs-actor").table(Configs::Table).to_owned())
|
|
||||||
.await?;
|
|
||||||
|
|
||||||
manager
|
manager
|
||||||
.drop_table(Table::drop().table(Credentials::Table).to_owned())
|
.drop_table(Table::drop().table(Credentials::Table).to_owned())
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
manager
|
|
||||||
.drop_index(Index::drop().name("index-credentials-login").table(Credentials::Table).to_owned())
|
|
||||||
.await?;
|
|
||||||
|
|
||||||
manager
|
manager
|
||||||
.drop_table(Table::drop().table(Sessions::Table).to_owned())
|
.drop_table(Table::drop().table(Sessions::Table).to_owned())
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
manager
|
|
||||||
.drop_index(Index::drop().name("index-sessions-secret").table(Sessions::Table).to_owned())
|
|
||||||
.await?;
|
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -166,30 +166,10 @@ impl MigrationTrait for Migration {
|
||||||
.drop_table(Table::drop().table(Addressing::Table).to_owned())
|
.drop_table(Table::drop().table(Addressing::Table).to_owned())
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
manager
|
|
||||||
.drop_index(Index::drop().name("index-addressing-actor").to_owned())
|
|
||||||
.await?;
|
|
||||||
|
|
||||||
manager
|
|
||||||
.drop_index(Index::drop().name("index-addressing-server").to_owned())
|
|
||||||
.await?;
|
|
||||||
|
|
||||||
manager
|
|
||||||
.drop_index(Index::drop().name("index-addressing-activity").to_owned())
|
|
||||||
.await?;
|
|
||||||
|
|
||||||
manager
|
|
||||||
.drop_index(Index::drop().name("index-addressing-object").to_owned())
|
|
||||||
.await?;
|
|
||||||
|
|
||||||
manager
|
manager
|
||||||
.drop_table(Table::drop().table(Deliveries::Table).to_owned())
|
.drop_table(Table::drop().table(Deliveries::Table).to_owned())
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
manager
|
|
||||||
.drop_index(Index::drop().name("index-deliveries-not-before").to_owned())
|
|
||||||
.await?;
|
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -172,36 +172,14 @@ impl MigrationTrait for Migration {
|
||||||
.drop_table(Table::drop().table(Attachments::Table).to_owned())
|
.drop_table(Table::drop().table(Attachments::Table).to_owned())
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
manager
|
|
||||||
.drop_index(Index::drop().name("index-attachment-object").to_owned())
|
|
||||||
.await?;
|
|
||||||
|
|
||||||
|
|
||||||
manager
|
manager
|
||||||
.drop_table(Table::drop().table(Mentions::Table).to_owned())
|
.drop_table(Table::drop().table(Mentions::Table).to_owned())
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
manager
|
|
||||||
.drop_index(Index::drop().name("index-mentions-object").table(Mentions::Table).to_owned())
|
|
||||||
.await?;
|
|
||||||
|
|
||||||
manager
|
|
||||||
.drop_index(Index::drop().name("index-mentions-actor-published").table(Mentions::Table).to_owned())
|
|
||||||
.await?;
|
|
||||||
|
|
||||||
|
|
||||||
manager
|
manager
|
||||||
.drop_table(Table::drop().table(Hashtags::Table).to_owned())
|
.drop_table(Table::drop().table(Hashtags::Table).to_owned())
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
manager
|
|
||||||
.drop_index(Index::drop().name("index-hashtags-object").table(Hashtags::Table).to_owned())
|
|
||||||
.await?;
|
|
||||||
|
|
||||||
manager
|
|
||||||
.drop_index(Index::drop().name("index-hashtags-name-published").table(Hashtags::Table).to_owned())
|
|
||||||
.await?;
|
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,10 +28,6 @@ impl MigrationTrait for Migration {
|
||||||
.drop_table(Table::drop().table(Deliveries::Table).to_owned())
|
.drop_table(Table::drop().table(Deliveries::Table).to_owned())
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
manager
|
|
||||||
.drop_index(Index::drop().name("index-deliveries-not-before").table(Deliveries::Table).to_owned())
|
|
||||||
.await?;
|
|
||||||
|
|
||||||
manager
|
manager
|
||||||
.create_table(
|
.create_table(
|
||||||
Table::create()
|
Table::create()
|
||||||
|
@ -85,14 +81,6 @@ impl MigrationTrait for Migration {
|
||||||
.drop_table(Table::drop().table(Jobs::Table).to_owned())
|
.drop_table(Table::drop().table(Jobs::Table).to_owned())
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
manager
|
|
||||||
.drop_index(Index::drop().name("index-jobs-activity").table(Jobs::Table).to_owned())
|
|
||||||
.await?;
|
|
||||||
|
|
||||||
manager
|
|
||||||
.drop_index(Index::drop().name("index-jobs-not-before").table(Jobs::Table).to_owned())
|
|
||||||
.await?;
|
|
||||||
|
|
||||||
manager
|
manager
|
||||||
.create_table(
|
.create_table(
|
||||||
Table::create()
|
Table::create()
|
||||||
|
|
Loading…
Reference in a new issue