Skip to content

Commit

Permalink
fix: Add index to cursor table (#4961)
Browse files Browse the repository at this point in the history
### Description

Add index to cursor table so than Scraper starts quickly

### Backward compatibility

Yes

### Testing

Manual

Co-authored-by: Danil Nemirovsky <[email protected]>
  • Loading branch information
ameten and ameten authored Dec 6, 2024
1 parent aeb2596 commit d043909
Showing 1 changed file with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,20 @@ impl MigrationTrait for Migration {
)
.to_owned(),
)
.await
.await?;

manager
.create_index(
Index::create()
.table(Cursor::Table)
.name("cursor_domain_idx")
.col(Cursor::Domain)
.index_type(IndexType::BTree)
.to_owned(),
)
.await?;

Ok(())
}

async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> {
Expand Down

0 comments on commit d043909

Please sign in to comment.