diff --git a/ops/external-prs/src/ossd/queries/blockchain_artifacts.sql b/ops/external-prs/src/ossd/queries/blockchain_artifacts.sql index 1efd970f7..50141b590 100644 --- a/ops/external-prs/src/ossd/queries/blockchain_artifacts.sql +++ b/ops/external-prs/src/ossd/queries/blockchain_artifacts.sql @@ -1,6 +1,6 @@ CREATE TABLE {{ source }}_blockchain_artifacts AS SELECT DISTINCT - p.slug AS project_slug, + p.name AS project_slug, LOWER(blockchains.blockchain.address) AS address, tag.tags AS tag, network.networks AS network diff --git a/ops/external-prs/src/ossd/queries/code_artifacts.sql b/ops/external-prs/src/ossd/queries/code_artifacts.sql index 57e5ea493..e2f89a9a3 100644 --- a/ops/external-prs/src/ossd/queries/code_artifacts.sql +++ b/ops/external-prs/src/ossd/queries/code_artifacts.sql @@ -1,6 +1,6 @@ CREATE TABLE {{ source }}_code_artifacts AS SELECT - p.slug as project_slug, + p.name as project_slug, gh.github.url as code_url, 'GITHUB' as code_host FROM {{ source }}_projects as p diff --git a/ops/external-prs/src/ossd/queries/package_artifacts.sql b/ops/external-prs/src/ossd/queries/package_artifacts.sql index 2f3ff383d..67f9ccc29 100644 --- a/ops/external-prs/src/ossd/queries/package_artifacts.sql +++ b/ops/external-prs/src/ossd/queries/package_artifacts.sql @@ -1,6 +1,6 @@ CREATE TABLE {{ source }}_package_artifacts AS SELECT - p.slug as project_slug, + p.name as project_slug, npm.npm.url as package_url, 'NPM' as package_host FROM {{ source }}_projects as p diff --git a/ops/external-prs/src/ossd/queries/project_status.sql b/ops/external-prs/src/ossd/queries/project_status.sql index e8ac1f571..26fa66f69 100644 --- a/ops/external-prs/src/ossd/queries/project_status.sql +++ b/ops/external-prs/src/ossd/queries/project_status.sql @@ -5,18 +5,18 @@ CREATE TABLE project_status AS SELECT CASE - WHEN main.slug IS NOT NULL THEN main.slug - ELSE pr.slug + WHEN main.name IS NOT NULL THEN main.name + ELSE pr.name END AS project_slug, CASE - WHEN main.slug IS NOT NULL AND pr.slug IS NOT NULL THEN + WHEN main.name IS NOT NULL AND pr.name IS NOT NULL THEN CASE WHEN main.name != pr.name THEN 'UPDATED' ELSE 'EXISTING' END - WHEN main.slug IS NOT NULL AND pr.slug IS NULL THEN 'REMOVED' + WHEN main.name IS NOT NULL AND pr.name IS NULL THEN 'REMOVED' ELSE 'ADDED' END AS status FROM main_projects AS main FULL OUTER JOIN pr_projects AS pr - ON main.slug = pr.slug \ No newline at end of file + ON main.name = pr.name \ No newline at end of file diff --git a/ops/external-prs/src/ossd/queries/projects_by_collection.sql b/ops/external-prs/src/ossd/queries/projects_by_collection.sql index 4664b7635..d0fa7bfad 100644 --- a/ops/external-prs/src/ossd/queries/projects_by_collection.sql +++ b/ops/external-prs/src/ossd/queries/projects_by_collection.sql @@ -1,6 +1,6 @@ CREATE TABLE {{ source }}_projects_by_collection AS SELECT - c.slug AS collection_slug, + c.name AS collection_slug, p.* AS project_slug FROM {{ source }}_collections AS c CROSS JOIN UNNEST(c.projects) AS p \ No newline at end of file