replaced tauri-sql with prisma-client-rust

This commit is contained in:
Ren Amamiya
2023-04-02 08:30:36 +07:00
parent 27082acf5c
commit 9b8a96c651
8 changed files with 2117 additions and 331 deletions

View File

@@ -8,7 +8,6 @@
extern crate objc;
use tauri::{Manager, WindowEvent};
use tauri_plugin_sql::{Migration, MigrationKind};
#[cfg(target_os = "macos")]
use window_ext::WindowExt;
@@ -25,23 +24,11 @@ fn main() {
Ok(())
})
.plugin(
tauri_plugin_sql::Builder::default()
.add_migrations(
"sqlite:lume.db",
vec![Migration {
version: 1,
description: "create default tables",
sql: include_str!("../migrations/20230226004139_create_tables.sql"),
kind: MigrationKind::Up,
}],
)
.build(),
)
.on_window_event(|e| {
#[cfg(target_os = "macos")]
let apply_offset = || {
let win = e.window();
// keep inset for traffic lights when window resize (macos)
win.position_traffic_lights(8.0, 20.0);
};
#[cfg(target_os = "macos")]