Merge command hints to do a slice, but there is no option for this #1707
Replies: 3 comments 7 replies
-
hi -
|
Beta Was this translation helpful? Give feedback.
-
sorry is your bug report missing information? you have two sequences of command examples that look identical to me yet you claim different output, and the second output does not make any sense as it's indicating a command that was run. converting to discussion since it's not clear what you are trying to do |
Beta Was this translation helpful? Give feedback.
-
if it were me looking at this, I'd say the only problem is that merge is outputting that particular error message which comes from the "create a revision" mechanics and it should be reworded in that codepath to say "this is not supported by merge". without looking into potential use cases here. but then you are saying you wrote it all out as rev ids manually and "alembic is good enough"....which implies you're actually looking to make a merge point that adds a new head, rather than resolving two existing heads, and that....is beyond what I'd understand is actually useful in real world scenarios. github is having an outage so I cant search for if there was an issue to add diff --git a/alembic/command.py b/alembic/command.py
index 8e48547..ff9b159 100644
--- a/alembic/command.py
+++ b/alembic/command.py
@@ -385,6 +385,7 @@ def merge(
message: Optional[str] = None,
branch_label: Optional[_RevIdType] = None,
rev_id: Optional[str] = None,
+ splice: bool = False,
) -> Optional[Script]:
"""Merge two revisions together. Creates a new migration file.
@@ -435,6 +436,7 @@ def merge(
refresh=True,
head=revisions,
branch_labels=branch_label,
+ splice=splice,
**template_args, # type:ignore[arg-type]
)
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
When I try to use
alembic merge
command to merge some non-head revisions together there appears an error with a hint to use a--slice
option but when I try to use it makes clear that this option is not available for that command. It looks to me like it's just missing there, because as what I tested alembic handles mergepoints created from non-head revisions good enough when I write these revisions by my self.results with
and
results with
Versions.
Beta Was this translation helpful? Give feedback.
All reactions