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

Error updating recently uploaded data #33

Closed
elesdoar opened this issue Sep 30, 2015 · 3 comments
Closed

Error updating recently uploaded data #33

elesdoar opened this issue Sep 30, 2015 · 3 comments
Assignees
Labels

Comments

@elesdoar
Copy link
Contributor

Upgrade cartodb-postgresql extension to 0.9.4 from new CartoDB release, which includes the new cartodbfy process. New user tables won't have the columns created_at nor updated_at.

https://github.com/CartoDB/cartodb/releases/tag/v3.11.0
https://github.com/CartoDB/cartodb-postgresql/blob/0.9.4/NEWS.md#090-2015-08-19

This generates an error creating new features from qgis-cartodb plugin, those columns are expected from the plugin.

@javisantana @andrewxhill

@elesdoar elesdoar added the bug label Sep 30, 2015
@elesdoar elesdoar self-assigned this Sep 30, 2015
@javisantana
Copy link

you can create them in the same way other columns exists. The trigger to update updated_at column is still there, you just need to execute:

ALTER TABLE YOURTABLE ADD created_at TIMESTAMPTZ NOT NULL DEFAULT now();
ALTER TABLE YOURTABLE ADD updated_at TIMESTAMPTZ NOT NULL DEFAULT now()
CREATE trigger update_updated_at_trigger BEFORE UPDATE ON YOURTABLE FOR EACH ROW EXECUTE PROCEDURE public._CDB_update_updated_at()

Those columns were taking lot of space and not so many people were using them.

Why do you need them?

@elesdoar
Copy link
Contributor Author

No, these are not necessary though they used to be required fields and not nullable in the exported sqlite file.
Does old tables exporting still generate created_at and updated_at as not nullable fields?

@javisantana
Copy link

Yes, old tables still have those columns

@elesdoar elesdoar changed the title Error updating recenly uploaded data Error updating recently uploaded data Oct 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants