Closed spapas closed 4 months ago
I have been getting the same error https://github.com/breatheco-de/apiv2/actions/runs/9757660712/job/26930572478?pr=1404
Yep - I am addressing right now: #634
Will be released in the next ~30 mins as 5.0.2 on pypi. Apologies for the oversight. I will also look to add a CI check to prevent this in the future.
I have this
migrations:
needs: cache
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
# Cache Pipenv packages
- name: Cache Pipenv packages
uses: actions/cache@v2
id: cache
with:
path: |
~/.local/share/virtualenvs
~/.cache/pip
key: ${{ runner.os }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('**/Pipfile.lock') }}
restore-keys: |
${{ runner.os }}-${{ env.PYTHON_VERSION }}-
# Install Pipenv
- name: Install dependencies
if: steps.cache.outputs.cache-hit == 'true'
run: |
pip install pipenv
- name: Check migrations
run: |
pipenv run python ./scripts/pending_migrations.py
import os
p = os.system('python manage.py makemigrations --check --dry-run')
if p:
exit(1)
Awesome, thanks! I'll get it integrated.
Why do you have the action call a python script that makes a bash call, vs just calling "makemigrations --check" directly in the yaml file?
Actually makemigrations --check
returns a value different of 0 on error, you could use it directly in the checks.yml file
Hello, after installing the version 5.0.1 I get the following warning when running
migrate
:When I run makemigrations it creates me a migration file in the dependency directory (i.e C:\progr\py3\ehcg\venv\Lib\site-packages\explorer\migrations). The migration file is
0019_alter_databaseconnection_engine.py
with the following contents :This is very problematic because when a new migration will be added to django-sql-explorer it will also get the number 19 and there will be a conflict. Can you please advise on how this situation should be handled ?
Thank you !