Skip to content

Commit

Permalink
release: v2022.11.7
Browse files Browse the repository at this point in the history
  • Loading branch information
a5huynh committed Nov 19, 2022
2 parents 22a613d + 69bc40d commit 95bd828
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions crates/migrations/src/m20221115_000001_local_file_pathfix.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use crate::sea_orm::Statement;
use entities::schema::{DocFields, SearchDocument};
use sea_orm_migration::prelude::*;
use sea_orm_migration::sea_orm::ConnectionTrait;

use entities::models::{crawl_queue, indexed_document};
use entities::sea_orm::{ActiveModelTrait, ColumnTrait, EntityTrait, QueryFilter, Set};
Expand Down Expand Up @@ -126,6 +128,15 @@ impl MigrationTrait for Migration {
let db = manager.get_connection();

println!("Updating crawl_queue");
manager
.get_connection()
.execute(Statement::from_string(
manager.get_database_backend(),
"UPDATE crawl_queue SET status = 'Queued' where status = '''Queued''ru'"
.to_string(),
))
.await?;

let queued = crawl_queue::Entity::find()
.filter(crawl_queue::Column::Url.starts_with("file://"))
.all(db)
Expand Down

0 comments on commit 95bd828

Please sign in to comment.