Update dependencies and lints

This commit is contained in:
2026-09-07 22:31:04 -07:00
parent b518d762f1
commit 9c288d051c
79 changed files with 3473 additions and 2923 deletions
+15 -9
View File
@@ -1,18 +1,22 @@
//! Custom views for shows.
use sea_orm::prelude::*;
use sea_orm::sea_query::Table;
use sea_orm::{ConnectionTrait, DbBackend, Statement};
use sea_orm::{DbBackend, Statement};
use sea_orm_migration::prelude::*;
pub async fn up(manager: &SchemaManager<'_>) -> Result<(), DbErr> {
/// # Errors
/// Database operations can fail.
pub(crate) async fn up(manager: &SchemaManager<'_>) -> Result<(), DbErr> {
manager
.drop_table(Table::drop().table("flix_watched_shows").to_owned())
.await?;
manager
_ = manager
.get_connection()
.execute_raw(Statement::from_string(
DbBackend::Sqlite,
r#"
"
CREATE VIEW flix_watched_shows AS
SELECT
w.show_id as id,
@@ -33,22 +37,24 @@ pub async fn up(manager: &SchemaManager<'_>) -> Result<(), DbErr> {
)
GROUP BY w.show_id, w.user_id
;
"#,
",
))
.await?;
Ok(())
}
pub async fn down(manager: &SchemaManager<'_>) -> Result<(), DbErr> {
manager
/// # Errors
/// Database operations can fail.
pub(crate) async fn down(manager: &SchemaManager<'_>) -> Result<(), DbErr> {
_ = manager
.get_connection()
.execute_raw(Statement::from_string(
DbBackend::Sqlite,
r#"
"
DROP VIEW flix_watched_shows
;
"#,
",
))
.await?;