trying to fix models
This commit is contained in:
parent
a1f18f803d
commit
b61e05a423
6 changed files with 20 additions and 28 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue