Skip to content

Commit

Permalink
v0.30.0
Browse files Browse the repository at this point in the history
  • Loading branch information
faldez committed May 31, 2023
1 parent 2dc8019 commit 5dbab3b
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 7 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
## [0.30.0]

### Changed

Expand Down Expand Up @@ -535,7 +535,7 @@ Nothing changes, this release to build for multiarch docker image

- fix panic when using local source

[Unreleased]: https://github.com/faldez/tanoshi/compare/v0.29.2...HEAD
[0.30.0]: https://github.com/faldez/tanoshi/compare/v0.29.2...v0.30.0
[0.29.2]: https://github.com/faldez/tanoshi/compare/v0.29.1...v0.29.2
[0.29.1]: https://github.com/faldez/tanoshi/compare/v0.29.0...v0.29.1
[0.29.0]: https://github.com/faldez/tanoshi/compare/v0.28.1...v0.29.0
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

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

3 changes: 3 additions & 0 deletions crates/tanoshi-web/Trunk.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ backend = "http://localhost:3030/image"
sass = "1.50.0"
wasm_bindgen = "0.2.80"
wasm_opt = "version_108"

[serve]
address = "0.0.0.0"
2 changes: 1 addition & 1 deletion crates/tanoshi/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tanoshi"
version = "0.29.2"
version = "0.30.0"
edition = "2021"
description = "Tanoshi"
repository = "https://github.com/faldez/tanoshi"
Expand Down
2 changes: 1 addition & 1 deletion crates/tanoshi/src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"package": {
"productName": "Tanoshi",
"version": "0.29.2"
"version": "0.30.0"
},
"build": {
"distDir": "../../tanoshi-web/dist",
Expand Down
15 changes: 13 additions & 2 deletions crates/tanoshi/src/infrastructure/database.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
use std::ops::{Deref, DerefMut};

use sqlx::sqlite::{SqliteConnectOptions, SqlitePool, SqlitePoolOptions};
use sqlx::{
migrate::MigrateError,
sqlite::{SqliteConnectOptions, SqlitePool, SqlitePoolOptions},
};

#[derive(Clone)]
pub struct Pool(SqlitePool);
Expand Down Expand Up @@ -40,7 +43,15 @@ pub async fn establish_connection(
.connect_with(opts)
.await?;

sqlx::migrate!("./migrations").run(&pool).await?;
match sqlx::migrate!("./migrations").run(&pool).await {
Err(MigrateError::VersionMismatch(version)) => {
warn!("migration {version} was previously applied but has been modified")
}
Err(e) => {
return Err(e.into());
}
_ => {}
}

Ok(Pool(pool))
}

0 comments on commit 5dbab3b

Please sign in to comment.