diff options
author | Melody Horn / boringcactus <melody@boringcactus.com> | 2021-06-14 20:54:57 -0600 |
---|---|---|
committer | Melody Horn / boringcactus <melody@boringcactus.com> | 2021-06-14 20:54:57 -0600 |
commit | 92bf14bb7cc0c10f67a9a67e7512138c15db6ec0 (patch) | |
tree | 4a18d50fe97f41671e4b4fd82483bc9c49333d70 /src/contrib/admin | |
parent | 6bcb3620d8be2f3bcfe72432d17955827894bb6e (diff) | |
download | tosin-92bf14bb7cc0c10f67a9a67e7512138c15db6ec0.tar.gz tosin-92bf14bb7cc0c10f67a9a67e7512138c15db6ec0.zip |
start working on migrations
Diffstat (limited to 'src/contrib/admin')
-rw-r--r-- | src/contrib/admin/migrations/m_0001_initial.rs | 10 | ||||
-rw-r--r-- | src/contrib/admin/migrations/mod.rs | 3 | ||||
-rw-r--r-- | src/contrib/admin/mod.rs | 3 |
3 files changed, 15 insertions, 1 deletions
diff --git a/src/contrib/admin/migrations/m_0001_initial.rs b/src/contrib/admin/migrations/m_0001_initial.rs new file mode 100644 index 0000000..6fed631 --- /dev/null +++ b/src/contrib/admin/migrations/m_0001_initial.rs @@ -0,0 +1,10 @@ +use crate::db::migration::{Migration, DatabaseChange}; + +pub const MIGRATION: Migration = Migration { + id: 1, + name: "initial", + prereqs: &[], + changes: &[ + DatabaseChange::CreateModel, + ], +}; diff --git a/src/contrib/admin/migrations/mod.rs b/src/contrib/admin/migrations/mod.rs new file mode 100644 index 0000000..5ecbb82 --- /dev/null +++ b/src/contrib/admin/migrations/mod.rs @@ -0,0 +1,3 @@ +use crate::db::migration::{Migration, gather}; + +gather!(); diff --git a/src/contrib/admin/mod.rs b/src/contrib/admin/mod.rs index 0f7e880..5098a4a 100644 --- a/src/contrib/admin/mod.rs +++ b/src/contrib/admin/mod.rs @@ -1,7 +1,8 @@ use crate::apps::AppConfig; +mod migrations; pub mod site; pub const APP: AppConfig = AppConfig { - + migrations: migrations::migrations, }; |