Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: undo drop of playbook_run_status #1133

Merged
merged 1 commit into from
Oct 16, 2024
Merged

fix: undo drop of playbook_run_status #1133

merged 1 commit into from
Oct 16, 2024

Conversation

yashmehrotra
Copy link
Member

@yashmehrotra yashmehrotra commented Oct 16, 2024

Error on aws

{"time":"2024-10-16T04:15:52.308735642Z","level":"ERROR+1","msg":"failed to apply schema migrations: applied 6 changes and then failed: drop enum type \"playbook_run_status\": pq: cannot drop type playbook_run_status because other objects depend on it"}

Seems like migration does not update column types ? we dont use that type anywhere but getting this from db

mission_control=# SELECT                                                                                     
    table_schema,
    table_name,
    column_name
FROM
    information_schema.columns
WHERE
    column_default LIKE '%playbook_run_status%';

-[ RECORD 1 ]+---------------------
table_schema | public
table_name   | playbook_run_actions
column_name  | status

Also, we should update the tool's version ? we are on a year old release and a new stable release was dropped 2 weeks ago, they added trigger support and function support as well

@adityathebe
Copy link
Member

@yashmehrotra the original default for playbook_run_actions.status was the enum playbook_run_status but that was later removed.

We should probably alter the default in migration instead

ALTER TABLE playbook_run_actions
ALTER COLUMN status SET DEFAULT 'running';

@yashmehrotra
Copy link
Member Author

@adityathebe I think we should try fixing it with tool version bump first and use alter command if that fails ?

@moshloop moshloop merged commit 7a7722b into main Oct 16, 2024
7 checks passed
@moshloop moshloop deleted the schema-fix branch October 16, 2024 05:28
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