diff --git a/crates/crawler/src/main.rs b/crates/crawler/src/main.rs
index 62ecd8d..cb6b8d2 100644
--- a/crates/crawler/src/main.rs
+++ b/crates/crawler/src/main.rs
@@ -201,12 +201,12 @@ fn crawl(tx: &mut mysql::Transaction, channel_config: &config::Channel) -> Resul
image_id
}
};
- let content_image_id =
- tx.insert_content_image(channel_item_content_id, image_id)?;
- debug!("Add content image relationship #{content_image_id}");
+ let channel_item_content_image_id =
+ tx.insert_channel_item_content_image(channel_item_content_id, image_id)?;
+ debug!("Add content image relationship #{channel_item_content_image_id}");
let uri = format!("/image/{image_id}");
tx.replace_channel_item_content_description(
- channel_item_content_id,
+ channel_item_content_description_id,
src,
&uri,
)?;
diff --git a/crates/mysql/database/0.1.0.sql b/crates/mysql/database/0.1.0.sql
index 2f1e5f6..443595f 100644
--- a/crates/mysql/database/0.1.0.sql
+++ b/crates/mysql/database/0.1.0.sql
@@ -1,5 +1,5 @@
-- MySQL Script generated by MySQL Workbench
--- нд, 11-січ-2026 20:33:40 +0200
+-- нд, 11-січ-2026 21:01:10 +0200
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
@@ -101,13 +101,13 @@ ENGINE = InnoDB;
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `rssto`.`channel_item_content_image` (
`channel_item_content_image_id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
- `content_channel_item_content_id` BIGINT UNSIGNED NOT NULL,
+ `channel_item_content_id` BIGINT UNSIGNED NOT NULL,
`image_id` BIGINT UNSIGNED NOT NULL,
PRIMARY KEY (`channel_item_content_image_id`),
- INDEX `fk_channel_item_content_image_channel_item_content_idx` (`content_channel_item_content_id` ASC) VISIBLE,
+ INDEX `fk_channel_item_content_image_channel_item_content_idx` (`channel_item_content_id` ASC) VISIBLE,
INDEX `fk_channel_item_content_image_image_idx` (`image_id` ASC) VISIBLE,
CONSTRAINT `fk_channel_item_content_image_channel_item_content`
- FOREIGN KEY (`content_channel_item_content_id`)
+ FOREIGN KEY (`channel_item_content_id`)
REFERENCES `rssto`.`channel_item_content` (`channel_item_content_id`)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
diff --git a/crates/mysql/src/connection.rs b/crates/mysql/src/connection.rs
index 22ce0cf..35c3469 100644
--- a/crates/mysql/src/connection.rs
+++ b/crates/mysql/src/connection.rs
@@ -114,22 +114,10 @@ impl Connection {
}
}
- pub fn content_image(&mut self, content_image_id: u64) -> Result