aboutsummaryrefslogtreecommitdiff
path: root/src/cli/migrate.rs
blob: 4b5123ad8502b065a8020922dd94882882fb109e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use structopt::StructOpt;

use crate::{Settings, UrlMap, db::backend::{Connectable, Connection}};

#[derive(StructOpt)]
/// Perform database migrations
pub struct Migrate {
}

impl Migrate {
    pub fn execute(self, _urls: UrlMap, settings: Settings<impl Connectable>) {
        let database = settings.database;
        let connection = database.connect().unwrap();

        let migration_table_vibe_check = connection.transaction::<(), diesel::result::Error, _>(|| {
            todo!()
        });
    }
}