From 969238f147eef596fb1019bd2a7a7d0ba50b3289 Mon Sep 17 00:00:00 2001 From: psteinroe Date: Wed, 19 Mar 2025 08:30:38 +0100 Subject: [PATCH 1/2] chore: update docs url --- crates/pgt_configuration/src/lib.rs | 5 +---- crates/pgt_workspace/src/configuration.rs | 4 +--- docs/index.md | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/crates/pgt_configuration/src/lib.rs b/crates/pgt_configuration/src/lib.rs index c34f808b9..aaf5ac077 100644 --- a/crates/pgt_configuration/src/lib.rs +++ b/crates/pgt_configuration/src/lib.rs @@ -84,10 +84,7 @@ impl PartialConfiguration { /// Returns the initial configuration. pub fn init() -> Self { Self { - // TODO: Update this once we have a static url - schema: Some(format!( - "https://supabase-community.github.io/postgres_lsp/schemas/{VERSION}/schema.json" - )), + schema: Some(format!("https://pgtools.dev/schemas/{VERSION}/schema.json")), files: Some(PartialFilesConfiguration { ignore: Some(Default::default()), ..Default::default() diff --git a/crates/pgt_workspace/src/configuration.rs b/crates/pgt_workspace/src/configuration.rs index 9ecc75b4b..0f12f12bc 100644 --- a/crates/pgt_workspace/src/configuration.rs +++ b/crates/pgt_workspace/src/configuration.rs @@ -177,9 +177,7 @@ pub fn create_config( configuration.schema = schema_path.to_str().map(String::from); } } else { - configuration.schema = Some(format!( - "https://supabase-community.github.io/postgres_lsp/schemas/{VERSION}/schema.json" - )); + configuration.schema = Some(format!("https://pgtools.dev/schemas/{VERSION}/schema.json")); } let contents = serde_json::to_string_pretty(&configuration) diff --git a/docs/index.md b/docs/index.md index 92afa3398..1a19bcd2c 100644 --- a/docs/index.md +++ b/docs/index.md @@ -41,7 +41,7 @@ After running the `init` command, you’ll have a `postgrestools.jsonc` file in ```json { - "$schema": "https://supabase-community.github.io/postgres_lsp/schemas/0.0.0/schema.json", + "$schema": "https://pgtools.dev/schemas/0.0.0/schema.json", "vcs": { "enabled": false, "clientKind": "git", From 39b25c4443893c1aab060820ef42f87310e89b7e Mon Sep 17 00:00:00 2001 From: psteinroe Date: Wed, 19 Mar 2025 08:32:34 +0100 Subject: [PATCH 2/2] fix: local schema path --- crates/pgt_workspace/src/configuration.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/pgt_workspace/src/configuration.rs b/crates/pgt_workspace/src/configuration.rs index 0f12f12bc..1daa6bcec 100644 --- a/crates/pgt_workspace/src/configuration.rs +++ b/crates/pgt_workspace/src/configuration.rs @@ -171,7 +171,7 @@ pub fn create_config( // we now check if pglt is installed inside `node_modules` and if so, we use the schema from there if VERSION == "0.0.0" { - let schema_path = Path::new("./node_modules/@pglt/pglt/schema.json"); + let schema_path = Path::new("./node_modules/@postgrestools/postgrestools/schema.json"); let options = OpenOptions::default().read(true); if fs.open_with_options(schema_path, options).is_ok() { configuration.schema = schema_path.to_str().map(String::from);