aboutsummaryrefslogtreecommitdiff
path: root/src/db
diff options
context:
space:
mode:
Diffstat (limited to 'src/db')
-rw-r--r--src/db/migration/mod.rs12
-rw-r--r--src/db/mod.rs1
2 files changed, 13 insertions, 0 deletions
diff --git a/src/db/migration/mod.rs b/src/db/migration/mod.rs
new file mode 100644
index 0000000..d53f46b
--- /dev/null
+++ b/src/db/migration/mod.rs
@@ -0,0 +1,12 @@
+pub use tosin_macros::gather_migrations as gather;
+
+pub struct Migration {
+ pub id: usize,
+ pub name: &'static str,
+ pub prereqs: &'static [(&'static str, usize)],
+ pub changes: &'static [DatabaseChange],
+}
+
+pub enum DatabaseChange {
+ CreateModel,
+}
diff --git a/src/db/mod.rs b/src/db/mod.rs
index b6528f5..05c38df 100644
--- a/src/db/mod.rs
+++ b/src/db/mod.rs
@@ -1,2 +1,3 @@
pub mod backend;
+pub mod migration;
pub mod models;