vatsrahul1001 opened a new issue, #48438:
URL: https://github.com/apache/airflow/issues/48438
### Apache Airflow version
2.10.5
### If "Other Airflow 2 version" selected, which one?
_No response_
### What happened?
Downgrade breaking
```
File
"/opt/airflow/airflow-core/src/airflow/migrations/versions/0036_3_0_0_add_name_field_to_dataset_model.py",
line 85, in downgrade
batch_op.create_index("idx_uri_unique", ["uri"], unique=True)
File "/usr/local/lib/python3.9/contextlib.py", line 126, in __exit__
next(self.gen)
File "/usr/local/lib/python3.9/site-packages/alembic/operations/base.py",
line 397, in batch_alter_table
impl.flush()
File "/usr/local/lib/python3.9/site-packages/alembic/operations/batch.py",
line 115, in flush
fn(*arg, **kw)
File "/usr/local/lib/python3.9/site-packages/alembic/ddl/postgresql.py",
line 98, in create_index
self._exec(CreateIndex(index, **kw))
File "/usr/local/lib/python3.9/site-packages/alembic/ddl/impl.py", line
247, in _exec
return conn.execute(construct, params)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/future/engine.py",
line 286, in execute
return self._execute_20(
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py",
line 1710, in _execute_20
return meth(self, args_10style, kwargs_10style, execution_options)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/sql/ddl.py", line
80, in _execute_on_connection
return connection._execute_ddl(
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py",
line 1477, in _execute_ddl
ret = self._execute_context(
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py",
line 1953, in _execute_context
self._handle_dbapi_exception(
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py",
line 2134, in _handle_dbapi_exception
util.raise_(
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/util/compat.py",
line 211, in raise_
raise exception
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py",
line 1910, in _execute_context
self.dialect.do_execute(
File
"/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line
736, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.IntegrityError: (psycopg2.errors.UniqueViolation) could not
create unique index "idx_uri_unique"
DETAIL: Key (uri)=(s3://output/1.txt) is duplicated.
[SQL: CREATE UNIQUE INDEX idx_uri_unique ON dataset (uri)]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
```
### What you think should happen instead?
_No response_
### How to reproduce
Execute below command
`airflow db reset -y && airflow dags reserialize && airflow db downgrade -n
2.7.0 -y`
### Operating System
linux
### Versions of Apache Airflow Providers
_No response_
### Deployment
Official Apache Airflow Helm Chart
### Deployment details
_No response_
### Anything else?
_No response_
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [x] I agree to follow this project's [Code of
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]