Skip to content

Commit

Permalink
Merge pull request #150 from AkeemAllen/feature/148-improve-update-fu…
Browse files Browse the repository at this point in the history
…nctionality

Feature/148 improve update functionality
  • Loading branch information
AkeemAllen authored Oct 5, 2024
2 parents 863dcd2 + d604b38 commit f9769e1
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wikigen",
"version": "1.7.1",
"version": "1.7.2",
"private": true,
"scripts": {
"dev": "vite dev",
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "wiki_gen"
version = "1.7.1"
version = "1.7.2"
description = "A Desktop Application to generate wikis for Pokemon Rom Hacks"
authors = ["Akeem Allen"]
license = ""
Expand Down
19 changes: 19 additions & 0 deletions src-tauri/src/migrations/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use std::{collections::HashMap, fs::File, path::PathBuf};

use serde::{Deserialize, Serialize};
use sqlx::Executor;
use tauri::AppHandle;

use crate::{database::get_sqlite_connection, logger};
Expand Down Expand Up @@ -68,6 +69,24 @@ pub async fn run_migrations(app_handle: AppHandle) -> Result<(), String> {
continue;
}
};
let result = match sqlx::query(
"INSERT INTO abilities (name, effect) VALUES ('migration-test-1', 'migration-test-1')",
)
.execute(&conn)
.await
{
Ok(result) => result,
Err(err) => {
logger::write_log(
&wiki_path,
logger::LogLevel::MigrationError,
&format!("Failed to execute migration: {}", err),
);
continue;
}
};

println!("Migration Result: {:?}", result);
}
Ok(())
}
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"package": {
"productName": "WikiGen",
"version": "1.7.1"
"version": "1.7.2"
},
"tauri": {
"allowlist": {
Expand Down

0 comments on commit f9769e1

Please sign in to comment.