trying to fix models

This commit is contained in:
Chris Cochrun 2024-09-12 15:27:34 -05:00
parent a1f18f803d
commit b61e05a423
6 changed files with 20 additions and 28 deletions

View file

@ -179,6 +179,7 @@ mod video_model {
use crate::schema::videos::dsl::*;
use cxx_qt::CxxQtType;
use cxx_qt_lib::{QByteArray, QModelIndex, QString, QUrl, QVariant};
use diesel::migration::MigrationConnection;
use diesel::sqlite::SqliteConnection;
use diesel::{delete, insert_into, prelude::*, update};
use std::path::PathBuf;
@ -217,6 +218,7 @@ impl video_model::VideoModel {
pub fn setup(mut self: Pin<&mut Self>) {
let db = &mut self.as_mut().get_db();
run_migrations(db);
let results = videos
.load::<crate::models::Video>(db)
.expect("Error loading videos");