about summary refs log tree commit diff stats
path: root/crates/yt/src/storage/migrate/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/yt/src/storage/migrate/mod.rs')
-rw-r--r--crates/yt/src/storage/migrate/mod.rs14
1 files changed, 12 insertions, 2 deletions
diff --git a/crates/yt/src/storage/migrate/mod.rs b/crates/yt/src/storage/migrate/mod.rs
index 418c893..c5187ee 100644
--- a/crates/yt/src/storage/migrate/mod.rs
+++ b/crates/yt/src/storage/migrate/mod.rs
@@ -97,8 +97,11 @@ pub(crate) enum DbVersion {
 
     /// Introduced: 2025-07-20.
     Five,
+
+    /// Introduced: 2025-08-26.
+    Six,
 }
-const CURRENT_VERSION: DbVersion = DbVersion::Five;
+const CURRENT_VERSION: DbVersion = DbVersion::Six;
 
 async fn add_error_context(
     function: impl Future<Output = Result<()>>,
@@ -151,6 +154,7 @@ impl DbVersion {
             DbVersion::Three => 3,
             DbVersion::Four => 4,
             DbVersion::Five => 5,
+            DbVersion::Six => 6,
 
             DbVersion::Empty => unreachable!("A empty version does not have an associated integer"),
         }
@@ -164,6 +168,7 @@ impl DbVersion {
             (3, "yt") => Ok(DbVersion::Three),
             (4, "yt") => Ok(DbVersion::Four),
             (5, "yt") => Ok(DbVersion::Five),
+            (6, "yt") => Ok(DbVersion::Six),
 
             (0, other) => bail!("Db version is Zero, but got unknown namespace: '{other}'"),
             (1, other) => bail!("Db version is One, but got unknown namespace: '{other}'"),
@@ -171,6 +176,7 @@ impl DbVersion {
             (3, other) => bail!("Db version is Three, but got unknown namespace: '{other}'"),
             (4, other) => bail!("Db version is Four, but got unknown namespace: '{other}'"),
             (5, other) => bail!("Db version is Five, but got unknown namespace: '{other}'"),
+            (6, other) => bail!("Db version is Six, but got unknown namespace: '{other}'"),
 
             (other, "yt") => bail!("Got unkown version for 'yt' namespace: {other}"),
             (num, nasp) => bail!("Got unkown version number ({num}) and namespace ('{nasp}')"),
@@ -208,8 +214,12 @@ impl DbVersion {
                 make_upgrade! {app, Self::Four, Self::Five, "./sql/5_Four_to_Five.sql"}
             }
 
-            // This is the current_version
             Self::Five => {
+                make_upgrade! {app, Self::Five, Self::Six, "./sql/6_Five_to_Six.sql"}
+            }
+
+            // This is the current_version
+            Self::Six => {
                 assert_eq!(self, CURRENT_VERSION);
                 assert_eq!(self, get_version(app).await?);
                 Ok(())