Skip to main content

boarddown_db/
migrations.rs

1use boarddown_core::Error;
2
3pub struct Migration;
4
5impl Migration {
6    pub const SCHEMA: &'static str = include_str!("../migrations/schema.sql");
7}
8
9pub async fn run_migrations() -> Result<(), Error> {
10    Ok(())
11}
12
13pub async fn run_migrations_on(conn: &rusqlite::Connection) -> Result<(), Error> {
14    conn.execute_batch(Migration::SCHEMA)
15        .map_err(|e| Error::Database(e.to_string()))?;
16    
17    Ok(())
18}