resolve deadlock issue, draft migration features

This commit is contained in:
yggverse 2024-10-07 19:54:28 +03:00
parent 259ec321be
commit 366c5fad8e
12 changed files with 192 additions and 210 deletions

View file

@ -11,7 +11,11 @@ pub struct Database {
}
impl Database {
pub fn init(tx: &Transaction) -> Result<Database, Error> {
pub fn new() -> Self {
Self {}
}
pub fn init(tx: &Transaction) -> Result<usize, Error> {
tx.execute(
"CREATE TABLE IF NOT EXISTS `app_browser_window_tab`
(
@ -20,9 +24,7 @@ impl Database {
`is_current` INTEGER NOT NULL
)",
[],
)?;
Ok(Self {})
)
}
pub fn add(