Skip to content

BCDA-9967: update column order to match existing view#462

Merged
bhagatparwinder merged 4 commits intomainfrom
BCDA-9967-add-model-short-name
May 5, 2026
Merged

BCDA-9967: update column order to match existing view#462
bhagatparwinder merged 4 commits intomainfrom
BCDA-9967-add-model-short-name

Conversation

@bhagatparwinder
Copy link
Copy Markdown
Contributor

🎫 Ticket

https://jira.cms.gov/browse/BCDA-9967

🛠 Changes

Updated column order to match the existing view

ℹ️ Context

Postgres rigidly maintains the existing column order for the existing view unless we drop and recreate the view. The earlier PR merged (#461) yields error:

SQL Error [42P16]: ERROR: cannot change name of view column "cms_id" to "benes_attributed_to_aco"
  Hint: Use ALTER VIEW ... RENAME COLUMN ... to change name of view column instead.

🧪 Validation

Executed/Updated views (without errors) and checked retrieved data

# Conflicts:
#	terraform/services/insights/views/bcda/prod-jobs-with-cms-id.view.sql
#	terraform/services/insights/views/bcda/sandbox-jobs-with-cms-id.view.sql
@bhagatparwinder bhagatparwinder merged commit fb0aaa4 into main May 5, 2026
17 checks passed
@bhagatparwinder bhagatparwinder deleted the BCDA-9967-add-model-short-name branch May 5, 2026 18:36
mianava pushed a commit that referenced this pull request May 6, 2026
## 🎫 Ticket

https://jira.cms.gov/browse/BCDA-9967

## 🛠 Changes

Updated column order to match the existing view

## ℹ️ Context

Postgres rigidly maintains the existing column order for the existing
view unless we drop and recreate the view. The earlier PR merged (#461)
yields error:

```
SQL Error [42P16]: ERROR: cannot change name of view column "cms_id" to "benes_attributed_to_aco"
  Hint: Use ALTER VIEW ... RENAME COLUMN ... to change name of view column instead.
```

## 🧪 Validation

Executed/Updated views (without errors) and checked retrieved data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants