-
Notifications
You must be signed in to change notification settings - Fork 105
Add new group Guides
and add a guide for writing up and down expresions
#775
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
Conversation
353ce14
to
ab2b3d4
Compare
docs/guides/updown.mdx
Outdated
description: Guide to writing up and down migrations | ||
--- | ||
|
||
In this guide you will learn how to write `up` and `down` migrations in your pgroll operations. First, we are looking at how `up` and `down` migrations work. Then we are going through a few examples. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion:
In this guide, you will learn...
I suggest saying "we will learn", that's what I would expect in most guides.
Then we are going through a few examples.
Change to "then we'll look at a few examples".
docs/guides/updown.mdx
Outdated
|
||
## What is an `up` and `down` migration of a pgroll operation? | ||
|
||
Most pgroll migrations include `up` and `down` migrations. When `pgroll` is migrating tables, it creates `up` and `down` triggers. The `up` triggers backfill the records in the table. The `down` triggers are running during rollback. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When
pgroll
is migrating tables...
Change to "When pgroll
migrates tables..."
The
down
triggers are running during rollback.
Change to "The down
triggers run during rollback."
Co-authored-by: Richard Gill <richardgill@users.noreply.github.com>
docs/guides/updown.mdx
Outdated
|
||
## What is an `up` and `down` migration of a `pgroll` operation? | ||
|
||
Most `pgroll` migrations include `up` and `down` migrations. When `pgroll` migrates tables, it creates `up` and `down` triggers. The `up` triggers backfill the records in the table. The `down` triggers run during rollback. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
both up
& down
triggers are run when updating the table, depending on the version the table is being updated with:
up
is always run to backfill new columns (if any), during the start processup
is also run for any insert/update of rows in the old version of the schemadown
is run for any insert/update of rows in the new version of the schema.
I believe it would be good to add some more explanations here
This PR adds a new section to the sidebar dedicated to guides. In this part of the documentation we could add guides for using pgroll with ORMs, baselining, etc.
The first guide I am adding is about writing
up
anddown
expressions in pgroll operations.