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

feat: add created and updated columns to DB #355

Merged
merged 2 commits into from
Oct 25, 2023
Merged

feat: add created and updated columns to DB #355

merged 2 commits into from
Oct 25, 2023

Conversation

cabreraalex
Copy link
Member

Description

Fix ZEN-266

Run following to update DB:

ALTER TABLE projects ADD COLUMN created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP;
ALTER TABLE projects ADD COLUMN updated_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP;

ALTER TABLE charts ADD COLUMN created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP;
ALTER TABLE charts ADD COLUMN updated_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP;

ALTER TABLE reports ADD COLUMN created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP;
ALTER TABLE reports ADD COLUMN updated_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP;

ALTER TABLE report_like ADD COLUMN created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP;
ALTER TABLE project_like ADD COLUMN created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP;

@linear
Copy link

linear bot commented Oct 24, 2023

ZEN-266 add created_time column to projects and reports

Also add created_time to likes to calculate "trending"

@cabreraalex
Copy link
Member Author

DB has to be updated before merge

@cabreraalex cabreraalex merged commit 9d2f8b5 into main Oct 25, 2023
6 checks passed
@cabreraalex cabreraalex deleted the ac-times branch October 25, 2023 23:24
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.

2 participants