saving some updates
This commit is contained in:
parent
bb3a5d9b7b
commit
9b75c366de
4 changed files with 70 additions and 39 deletions
|
@ -156,6 +156,7 @@ mod image_model {
|
|||
}
|
||||
}
|
||||
|
||||
use crate::models::run_migrations;
|
||||
use crate::schema::images::dsl::*;
|
||||
use cxx_qt::CxxQtType;
|
||||
use cxx_qt_lib::{QModelIndex, QString, QUrl, QVariant};
|
||||
|
@ -197,6 +198,7 @@ impl image_model::ImageModel {
|
|||
|
||||
pub fn setup(mut self: Pin<&mut Self>) {
|
||||
let db = &mut self.as_mut().get_db();
|
||||
run_migrations(db);
|
||||
let results = images
|
||||
.load::<crate::models::Image>(db)
|
||||
.expect("Error loading images");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue