diff --git a/Cargo.lock b/Cargo.lock
index 5923724..2bccd02 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -284,8 +284,15 @@ dependencies = [
"libsqlite3-sys",
"smallvec",
"time",
+ "uuid",
]
+[[package]]
+name = "sha1_smol"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012"
+
[[package]]
name = "smallvec"
version = "1.9.0"
@@ -311,6 +318,7 @@ dependencies = [
"log",
"rusqlite",
"time",
+ "uuid",
"xdg",
]
@@ -364,6 +372,15 @@ version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c4f5b37a154999a8f3f98cc23a628d850e154479cd94decf3414696e12e31aaf"
+[[package]]
+name = "uuid"
+version = "1.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dd6469f4314d5f1ffec476e05f17cc9a78bc7a27a6a857842170bdf8d6f98d2f"
+dependencies = [
+ "sha1_smol",
+]
+
[[package]]
name = "vcpkg"
version = "0.2.15"
diff --git a/Cargo.toml b/Cargo.toml
index fb8a5d8..dcb79ea 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,8 +13,9 @@ maintenance = { status = "experimental" }
[dependencies]
clap = { version = "3.2.16", default-features = false, features = ["derive", "std"] }
log = "0.4.17"
-rusqlite = { version = "0.28.0", features = ["bundled", "time"] }
+rusqlite = { version = "0.28.0", features = ["bundled", "time", "uuid"] }
time = "0.3"
+uuid = { version = "1.1.2", features = ["v5"] }
xdg = "2.4.1"
diff --git a/database/migrations/202208211624.sql b/database/migrations/202208211624.sql
new file mode 100644
index 0000000..61b380d
--- /dev/null
+++ b/database/migrations/202208211624.sql
@@ -0,0 +1,2 @@
+ALTER TABLE tasks
+ ADD COLUMN uuid BLOB;
diff --git a/database/schema.sql b/database/schema.sql
index a5e919f..290efdb 100644
--- a/database/schema.sql
+++ b/database/schema.sql
@@ -8,6 +8,7 @@ CREATE TABLE tasks (
project TEXT ,
link TEXT ,
dir_path TEXT ,
+ uuid BLOB ,
current BOOLEAN NOT NULL DEFAULT false,
diff --git a/src/repo.rs b/src/repo.rs
index 4d72c04..7200ff7 100755
--- a/src/repo.rs
+++ b/src/repo.rs
@@ -64,7 +64,7 @@ pub struct UpdateTaskData {
}
pub trait Repository {
- fn get_current_task_opt(&self) -> Result