-
-
Notifications
You must be signed in to change notification settings - Fork 254
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
ValueError: Constraint must have a name
in alembic 1.10.0
#1195
Comments
Seems related to 714b744 |
The error occurs here: alembic/alembic/operations/batch.py Lines 665 to 667 in cd7b1a9
|
diff --git a/mlflow/store/db_migrations/versions/cfd24bdc0731_update_run_status_constraint_with_killed.py b/mlflow/store/db_migrations/versions/cfd24bdc0731_update_run_status_constraint_with_killed.py
index beb02a2d3..89a207576 100644
--- a/mlflow/store/db_migrations/versions/cfd24bdc0731_update_run_status_constraint_with_killed.py
+++ b/mlflow/store/db_migrations/versions/cfd24bdc0731_update_run_status_constraint_with_killed.py
@@ -60,6 +60,7 @@ def upgrade():
*new_run_statuses,
create_constraint=True,
native_enum=False,
+ name="status",
),
existing_type=Enum(
*old_run_statuses, fixed the error. |
this seems a regression. Let's keep open for now, until we investigate |
@CaselIT Got it! |
thanks for reporting |
thanks for reporting. This looks like a regression. set |
@ts-accessio just to confirm, you are using sqlite what sqlalchemy version? |
SQLAlchemy==1.3.24 |
Mike Bayer has proposed a fix for this issue in the main branch: distinguish between string contraint name and defined https://gerrit.sqlalchemy.org/c/sqlalchemy/alembic/+/4491 |
Hello, I have same problems with alembic==1.10.1 (or latest)
migration file:
code:
DB Browser for SQLite Version 3.12.2 |
For this time I solve by changing migration file:
But in db it looks :
instead of
|
same issue for 1.11.1 fixed using @kitty7c6 solution |
I'm not even creating a constraint and still running into this issue for
yields
|
Can confirm for |
same error for version modify according to method from @kitty7c6 works:
|
I have the same issue with the latest version |
Describe the bug
ValueError: Constraint must have a name
in alembic 1.10.0.Expected behavior
Migration succeeds.
To Reproduce
Please try to provide a Minimal, Complete, and Verifiable example, with the migration script and/or the SQLAlchemy tables or models involved.
See also Reporting Bugs on the website.
I'm trying to create a minimal reproducer now, but the migration script that caused the error looks like this:
Error
Versions.
Additional context
The migration script works fine in alembic 1.9.4.
Have a nice day!
The text was updated successfully, but these errors were encountered: