-
Notifications
You must be signed in to change notification settings - Fork 280
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: support multiple queries for clickhouse using up/down-sections #589
base: main
Are you sure you want to change the base?
Conversation
- specially prepared for clickhouse, but might work with any other drivers if needed
This seems like a nice solution that avoids full sql parsing. Imo we could avoid the separate Curious to hear what others think. |
+1 on allowing multiple |
This might work also. Maybe we need just keep in mind this detail: That we have You can also have multiple So it's just a question of implementation for sure. |
Personally, I would expect that migration options specified on a |
Chiming in as a current goose user who couldn't use Multiple For me, It turns seven clickhouse migrations into a single file and has zero impact on the postgres migration files. |
+1 Any timeline to expect for this to release? |
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.
Rework the PR to not introduce migrate:up-section
and migrate:down-section
, and instead change ParsedMigration
's Up
from string
to []string
and UpOptions
from ParsedMigrationOptions
to []ParsedMigrationOptions
, and similar for Down
and DownOptions
.
The tests are lacking cases that demonstrate the ability to specify different migration options per each up or down block.
The PR is also missing updates to the documentation that document this feature, as well.
Currently, ClickHouse does not support executing multiple queries. However with these changes, it becomes possible.
We just put each separate up- or down-query in sections. The sections are optional.