0

I have the following directory structure:

.
└── alembic/
    └── migrations/
        ├── version/
        │   ├── __init__.py
        │   └── version.py
        ├── __init__.py
        └── materialized_views.py

I am attempting to import from the materialized_views.py into version.py and have the following import within the "version.py" file.

from migrations.materialized_views import (
    SQL_REFRESH, Version1
)

I am attempting to create an alembic revision with the following command:

alembic revision -m "Add new fields"

However, when I run this, I am seeing the following error:

from migrations.materialized_views import (
ModuleNotFoundError: No module named 'alembic.migrations'

Reading through other posts on StackOverflow, I should be able to import and reference as I have the init.py files. What can I do to use the SQL_FRESH and Version1 imports?

Thank you all for your time.

DougM
  • 920
  • 1
  • 9
  • 21

0 Answers0