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

Version 4.1.0 alter extension powa update ERROR: column "last_present_ts" of relation "powa_statements" already exists #121

Closed
banlex73 opened this issue Dec 14, 2020 · 2 comments
Assignees

Comments

@banlex73
Copy link

Somehow I already had that column in my table.
Fixed:
alter table powa_statements drop column last_present_ts; alter extension powa update;

I suspect a bug in powa--4.0.1--4.1.0.sql
should use
ALTER TABLE public.powa_statements ADD if not exists last_present_ts timestamptz NULL DEFAULT now();

@rjuju rjuju self-assigned this Dec 14, 2020
@rjuju
Copy link
Member

rjuju commented Dec 14, 2020

The last_present_ts column didn't exist in version 4.0.1, so the upgrade script as-is should work. Maybe you added this column manually and modified the purge function manually when working on powa-team/powa-archivist#32?

I don't think that the upgrade script should try to detect direct modification of the tables.

@banlex73
Copy link
Author

banlex73 commented Dec 14, 2020 via email

@rjuju rjuju closed this as completed Jan 10, 2021
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

No branches or pull requests

2 participants