Add junction between relays and schedules
This commit is contained in:
parent
a90ea25b87
commit
2f51ebf91e
10 changed files with 209 additions and 53 deletions
emgauwa-lib/src/db
|
@ -5,7 +5,7 @@ use sqlx::pool::PoolConnection;
|
|||
use sqlx::Sqlite;
|
||||
|
||||
use crate::db::errors::DatabaseError;
|
||||
use crate::db::{DbController, DbTag};
|
||||
use crate::db::{DbController, DbJunctionTag, DbTag};
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct DbRelay {
|
||||
|
@ -153,7 +153,7 @@ impl DbRelay {
|
|||
|
||||
for new_tag in new_tags {
|
||||
let tag: DbTag = DbTag::get_by_tag_or_create(conn, new_tag).await?;
|
||||
tag.link_relay(conn, self).await?;
|
||||
DbJunctionTag::link_relay(conn, &tag, self).await?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue