import migrations and don't require diesel_cli for admins (#555)
* import migrations via macro * panic on database not to the latest migration * add subcommand to plm * create migration that run tantivy index creation * remove diesel_cli from places it was * use our migration system for tests * create table __diesel_schema_migrations if needed
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
-- This file should undo anything in `up.sql`
|
||||
--#!|_conn, path: &Path| {
|
||||
--#! let mut pb = path.to_path_buf();
|
||||
--#! pb.push("search_index");
|
||||
--#! std::fs::remove_dir_all(pb).map_err(Error::from)
|
||||
--#!}
|
||||
@@ -0,0 +1,10 @@
|
||||
-- Your SQL goes here
|
||||
--#!|conn: &Connection, path: &Path| {
|
||||
--#! let mut pb = path.to_path_buf();
|
||||
--#! pb.push("search_index");
|
||||
--#! let searcher = super::search::Searcher::create(&pb)?;
|
||||
--#! searcher.fill(conn)?;
|
||||
--#! searcher.commit();
|
||||
--#! Ok(())
|
||||
--#!}
|
||||
|
||||
Reference in New Issue
Block a user