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

docs: add page on created_at / updated_at timestamps (close #2880) #5223

Merged

Conversation

marionschleifer
Copy link
Contributor

@marionschleifer marionschleifer commented Jun 26, 2020

Description

Add a page on default timestamp values to make this information easier to find for users.

Changelog

  • CHANGELOG.md is updated with user-facing content relevant to this PR. If no changelog is required, then add the no-changelog-required label.

Affected components

  • Docs

Related Issues

#2880

Added page

https://deploy-preview-5223--hasura-docs.netlify.app/graphql/manual/schema/default-values/created-updated-timestamps.html

@marionschleifer marionschleifer added the c/docs Related to docs label Jun 26, 2020
@marionschleifer marionschleifer requested review from a team as code owners June 26, 2020 13:46
@marionschleifer marionschleifer changed the title docs: add page on default timestamp values docs: add page on default timestamp values (close #2880) Jun 26, 2020
@netlify
Copy link

netlify bot commented Jun 26, 2020

Deploy preview for hasura-docs ready!

Built with commit 9ddbb25

https://deploy-preview-5223--hasura-docs.netlify.app

@netlify
Copy link

netlify bot commented Jun 26, 2020

Deploy preview for hasura-docs ready!

Built with commit dc36c1a

https://deploy-preview-5223--hasura-docs.netlify.app

@sezgi sezgi removed their assignment Jun 26, 2020
Copy link
Member

@rikinsk rikinsk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • can we just call the page "Adding created_at / updated_at timestamps" as that is what the page is actually talking about. The current title and presentation left me extremely confused about the intent of this page. created_at and updated_at are not exactly default values for timestamp values but are rather special columns whose values can be set by using some default values
  • updated_at is not achievable by adding a simple default value. One needs to add a postgres trigger that updates the timestamp value after each update. Hence the instructions under the ClI/API tab are inaccurate

@rikinsk rikinsk assigned marionschleifer and unassigned rikinsk Jul 1, 2020
@marionschleifer marionschleifer changed the title docs: add page on default timestamp values (close #2880) docs: add page on created_at / updated_at timestamps (close #2880) Jul 6, 2020
@sezgi sezgi assigned rikinsk and unassigned sezgi Jul 8, 2020
Copy link
Member

@rikinsk rikinsk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marionschleifer This looks good. Just one change, for the updated_at code-block you might want to use code-block:: plpgsql in place of code-block:: sql to get the highlighting to work

@sezgi The page has kind of changed completely so you should take a look at the changes again I guess. Also, I havent verified all the instructions.

@rikinsk rikinsk requested a review from sezgi July 8, 2020 15:59
@rikinsk rikinsk assigned sezgi and marionschleifer and unassigned rikinsk Jul 8, 2020
@marionschleifer marionschleifer removed their assignment Jul 9, 2020
@marionschleifer
Copy link
Contributor Author

@sezgi please see the changes.

@sezgi sezgi assigned marionschleifer and unassigned sezgi Jul 11, 2020
@marionschleifer marionschleifer merged commit 2898450 into hasura:master Jul 14, 2020
@hasura-bot
Copy link
Contributor

Review app https://hge-ci-pull-5223.herokuapp.com is deleted

@marionschleifer marionschleifer deleted the docs-created-at-updated-at branch July 14, 2020 08:03
marionschleifer added a commit to marionschleifer/graphql-engine that referenced this pull request Jul 20, 2020
stevefan1999-personal pushed a commit to stevefan1999-personal/graphql-engine that referenced this pull request Sep 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/docs Related to docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants