Skip to content
This repository has been archived by the owner on Jun 29, 2021. It is now read-only.

Update timestamps columns of tags table to consider timezones #29

Closed
josepostiga opened this issue Oct 3, 2020 · 3 comments · Fixed by #38
Closed

Update timestamps columns of tags table to consider timezones #29

josepostiga opened this issue Oct 3, 2020 · 3 comments · Fixed by #38
Assignees
Labels
enhancement Small increment or feature request

Comments

@josepostiga
Copy link
Member

josepostiga commented Oct 3, 2020

Is your feature request related to a problem? Please describe.
The current tags table schema has timestamps columns without timezone information. Timezones are a valid concern, especially when it's expected to have resources submitted by users from different timezones.

Since we're preparing the application to support users' accounts (see #22), we should add this information now and handle timezone differences directly on the database layer.

Describe the solution you'd like
Add the necessary migrations to update all timestamp columns to contain timezone information. Besides that, ensure that the application layer always calculates any timezone information to always be stored and shown as UTC. The clients, whenever possible, should deal with any timezone calculation for a given guest or user.

Describe alternatives you've considered
N/A

Additional context
N/A

@josepostiga josepostiga added the enhancement Small increment or feature request label Oct 3, 2020
@ialexreis
Copy link
Contributor

Hello @josepostiga !

To start my contribution I could update this issue and this (#28) one too.

I was thinking about altering the tables, removing the standard timestamps columns and creating the timestampsTz ones.
I read about that in some articles and I believe that this is the best way to improve this..

Let me know if you have other suggestions for both issues! 😄

@josepostiga
Copy link
Member Author

josepostiga commented Oct 7, 2020

@ADeVR sure! Feel free to start working on that. Just open a draft PR to link both issues.

I'll go ahead and update the assignee, too.

Edit: can you comment on #28 so that I can add you as an assignee?

@ialexreis
Copy link
Contributor

@josepostiga sure! I will comment that issue as well!

josepostiga pushed a commit that referenced this issue Oct 16, 2020
…s" (#38)

* feat(Tags): add support to timestamps w/timezones

- drop regular timestamps columns
- create new ones with timestampsTz

* feat(Links): add support to timestamps w/timezones

added doctrine/dbal dependency

* fix: add method return type

* fix(Links): add missing timestamp (approved_at)

* chore: converted timestampTz to softDeletesTz

* feat(links): added approved_at datetime cast

* fix: replaced dropColumn with change method

* chore(Changelog): add latest updates

timestamps columns (on links and tags) changed to datetime w/timezone
tiagof pushed a commit to tiagof/api that referenced this issue Oct 17, 2020
… columns on links and tags tables" (laravel-portugal#38)

* feat(Tags): add support to timestamps w/timezones

- drop regular timestamps columns
- create new ones with timestampsTz

* feat(Links): add support to timestamps w/timezones

added doctrine/dbal dependency

* fix: add method return type

* fix(Links): add missing timestamp (approved_at)

* chore: converted timestampTz to softDeletesTz

* feat(links): added approved_at datetime cast

* fix: replaced dropColumn with change method

* chore(Changelog): add latest updates

timestamps columns (on links and tags) changed to datetime w/timezone
josepostiga pushed a commit that referenced this issue Oct 25, 2020
* init

* Adds Question create feature

resolves #25
Removes unnecessary code in AccountsStoreController.

* Added '/discussions' prefix

As per #25 (comment)

* Minor fixes as per review

#40 (review)

* Cleanup

* Added question update

* Added tests

* Resolves #28, #29: "Update timestamps columns on links and tags tables" (#38)

* feat(Tags): add support to timestamps w/timezones

- drop regular timestamps columns
- create new ones with timestampsTz

* feat(Links): add support to timestamps w/timezones

added doctrine/dbal dependency

* fix: add method return type

* fix(Links): add missing timestamp (approved_at)

* chore: converted timestampTz to softDeletesTz

* feat(links): added approved_at datetime cast

* fix: replaced dropColumn with change method

* chore(Changelog): add latest updates

timestamps columns (on links and tags) changed to datetime w/timezone

* Resolves #25 - An authenticated user can post a question (#40)

* init

* Adds Question create feature

resolves #25
Removes unnecessary code in AccountsStoreController.

* Added '/discussions' prefix

As per #25 (comment)

* Minor fixes as per review

#40 (review)

* Cleanup

* Resolve conflicts + test tweaks

* Code cleanup + minor improvements

* minor tweaks

* final tweaks/cleanup

* style(Discussions): minor code style fixes

* ci(PHPUnit): add blade files to the code coverage exclusion list

Co-authored-by: Alexandre Reis <[email protected]>
Co-authored-by: José Postiga <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Small increment or feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants