remove copying from shared migrations

This commit is contained in:
Mark Sinclair
2025-11-12 11:35:58 +00:00
parent 9bef69d967
commit dc78f979e1
5 changed files with 0 additions and 35 deletions
Generated
-1
View File
@@ -5717,7 +5717,6 @@ dependencies = [
"chrono",
"clap",
"cosmrs",
"glob",
"nym-bin-common",
"nym-config",
"nym-network-defaults",
-1
View File
@@ -266,7 +266,6 @@ futures = "0.3.31"
futures-util = "0.3"
generic-array = "0.14.7"
getrandom = "0.2.10"
glob = "0.3"
handlebars = "3.5.5"
hex = "0.4.3"
hickory-resolver = "0.25"
-4
View File
@@ -1,4 +0,0 @@
# ignore files that are copied in from `../common/nyxd-scraper-psql/sql_migrations/* migrations`
# and remember to name the migrations to avoid collisions and so they process in the correct string sort order
0001_metadata.sql
0002_cosmos.sql
-1
View File
@@ -46,6 +46,5 @@ utoipauto = { workspace = true }
[build-dependencies]
anyhow = { workspace = true }
glob = { workspace = true }
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
sqlx = { workspace = true, features = ["runtime-tokio-rustls", "postgres"] }
-28
View File
@@ -1,35 +1,7 @@
// Copyright 2025 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: Apache-2.0
use glob::glob;
use std::env;
use std::path::Path;
fn main() {
// copy common manifest files from "../common/nyxd-scraper-psql/sql_migrations/* migrations"
println!("Copying common migrations...");
let manifest_dir_string = env::var("CARGO_MANIFEST_DIR").unwrap();
let common_migrations_path =
Path::new(&manifest_dir_string).join("../common/nyxd-scraper-psql/sql_migrations/");
let output_path = Path::new(&manifest_dir_string).join("migrations");
println!(
"output_path: {:?} (exists = {})",
output_path,
output_path.exists()
);
let common_migrations_path = common_migrations_path.as_path();
println!(
"common_migrations_path: {:?} (exists = {})",
common_migrations_path,
common_migrations_path.exists()
);
for file in glob(&format!("{common_migrations_path:?}/*"))
.unwrap()
.flatten()
{
println!("- {file:?}");
std::fs::copy(file, &output_path).unwrap();
}
if let Ok(database_url) = std::env::var("DATABASE_URL") {
println!("cargo:rustc-env=DATABASE_URL={database_url}");
}