mirror of
https://github.com/block/buzz.git
synced 2026-10-27 20:41:57 +00:00
test(db): run invite upgrade pgschema from the repository root
The invitation upgrade test launched bin/pgschema from the package directory, so pgschema missed the root .pgschemaignore and exercised a different apply path than every other caller. Set the working directory to the repository root, matching the runtime/migration.rs helper. Co-authored-by: Elrond <28d6302a099e5225b02c4155ac4236e4912603df2ab08dbfc2f4fef08ce598c8@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Luke Tornquist <tornquist@squareup.com>
This commit is contained in:
@@ -458,10 +458,12 @@ async fn apply_pgschema_to_existing_database(pool: &PgPool) {
|
||||
.fetch_one(pool)
|
||||
.await
|
||||
.unwrap();
|
||||
let pgschema = std::path::Path::new(env!("CARGO_MANIFEST_DIR")).join("../../bin/pgschema");
|
||||
let schema_file =
|
||||
std::path::Path::new(env!("CARGO_MANIFEST_DIR")).join("../../schema/schema.sql");
|
||||
let output = std::process::Command::new(pgschema)
|
||||
// Run from the repository root, like every pgschema caller, so
|
||||
// `.pgschemaignore` applies.
|
||||
let repo_root = std::path::Path::new(env!("CARGO_MANIFEST_DIR")).join("../..");
|
||||
let schema_file = repo_root.join("schema/schema.sql");
|
||||
let output = std::process::Command::new(repo_root.join("bin/pgschema"))
|
||||
.current_dir(&repo_root)
|
||||
.args([
|
||||
"apply",
|
||||
"--auto-approve",
|
||||
|
||||
Reference in New Issue
Block a user