summaryrefslogtreecommitdiff
path: root/src/bin/revert.rs
blob: cd26968af6ae2dea628bbfcda176b0301f341cf7 (plain)
1
2
3
4
5
6
7
8
9
10
use diesel::pg::PgConnection;
use diesel::prelude::*;

use space::math::get_db_url;

fn main() {
    let connection = PgConnection::establish(&get_db_url()).expect("Cannot connect");
    migrations_internals::revert_latest_migration(&connection).expect("Cannot revert migrations");
    migrations_internals::revert_latest_migration(&connection).expect("Cannot revert migrations");
}