Skip to content

Conversation

@dstandish
Copy link
Contributor

This makes it so that we can alembic commands from the root repo dir.

E.g.

alembic -c airflow/alembic.ini revision --autogenerate -m "Do something"

Sometimes when running from airflow subfolder we get errors.

This makes it so that we can alembic commands from the root repo dir.

E.g.

```
alembic -c airflow/alembic.ini revision --autogenerate -m "Do something"
```

Sometimes when running from airflow subfolder we get errors.
@ephraimbuddy
Copy link
Contributor

I had instructed contributors to copy the airflow’s alembic.ini here https://github.com/apache/airflow/blob/main/contributing-docs/13_metadata_database_updates.rst#create-alembic-migration-scripts. Maybe we should also update there

@dstandish
Copy link
Contributor Author

I had instructed contributors to copy the airflow’s alembic.ini here https://github.com/apache/airflow/blob/main/contributing-docs/13_metadata_database_updates.rst#create-alembic-migration-scripts. Maybe we should also update there

I don't really understand the implications re what that section is about and how this would impact that. Can you possibly make a suggestion re what I should change?

@ephraimbuddy
Copy link
Contributor

https://github.com/apache/airflow/blob/main/contributing-docs/13_metadata_database_updates.rst#create-alembic-migration-scripts

This line in the doc:
Replace the content of your application's alembic.ini file with Airflow's alembic.ini copy..

I'm not sure it will work if copied over. WDYT?

Copy link
Contributor

@ephraimbuddy ephraimbuddy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and it works

@ephraimbuddy
Copy link
Contributor

We can also update the one at airflow/providers/fab/alembic.ini

@ephraimbuddy ephraimbuddy merged commit 5ed3f49 into apache:main Sep 20, 2024
@ephraimbuddy ephraimbuddy deleted the make-migratinos-path-relative-to-ini branch September 20, 2024 18:10
@dstandish
Copy link
Contributor Author

Tested and it works

Thanks a bunch Ephraim 🙏

joaopamaral pushed a commit to joaopamaral/airflow that referenced this pull request Oct 21, 2024
This makes it so that we can alembic commands from the root repo dir.

E.g.

```
alembic -c airflow/alembic.ini revision --autogenerate -m "Do something"
```

Sometimes when running from airflow subfolder we get errors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants