background-jobs/jobs-postgres/src/migrations/V000__enable_pgcrypto.rs

12 lines
270 B
Rust
Raw Normal View History

2024-01-10 05:16:35 +00:00
use barrel::backend::Pg;
use barrel::functions::AutogenFunction;
use barrel::{types, Migration};
pub(crate) fn migration() -> String {
let mut m = Migration::new();
m.inject_custom("CREATE EXTENSION IF NOT EXISTS pgcrypto;");
m.make::<Pg>().to_string()
}