Comments (12)
The above was resolved by making the below change
migrations.RunPython(
code=migrations.RunPython.noop,
reverse_code=add_legacy_name,
hints={"model_name": "contenttype"},
elidable=False,
),
from django-squash.
The bigger issue i see is that anything inside site packages should be ignored and it decided to squash it.. Iām on vacation now, but i will look into this when i have a chance. thank you for bringing it up to my attention.
from django-squash.
@harishr1308 thank you for your patience. I've tried replicating your issue to no avail, if i can ask you to give me a couple of details:
- where is your code installed?
- why this this function failing to see the difference between your env (
/env/lib/python3.9/site-packages
) vs where your code is installed in?
i should reiterate: site-packages
should be ignored completely by django-squash
, i need to understand why it's not doing whats intended.
from django-squash.
Welcome back from your vacation! My environment is within the project root directory.
from django-squash.
Just to clarify: your code is installed inside the site-packages
? i.e. you have a setup.py
and you ran install
?
from django-squash.
May i ask, what is your dev environment doing inside site-packages
?
from django-squash.
from django-squash.
Hi! Sorry for getting back to you sooo late. My code is not installed inside site-packages. I've got my local environment sitting on the root of the project directory. This package was installed by running pip install and I configured it as an app in Django Settings and ran python manage.py squash_migrations.
from django-squash.
Right, that's an issue. Very few django projects ive seen work this way, and i've personally never worked with one that does.
I can see this working if i create a kind of project variable that holds the apps you want to squash.. or just tell the squash command.
I'll think about it a bit more and get back to you.
from django-squash.
Looks like i did think ahead. I included --only
and --ignore-apps
arguments to the squash_migrations
management command. Depending on how many apps you're using, you would chose one or the other, personally, i'd go with --only
since that would be the most explicit way, but up to you.
Let me know if that solves your issue.
from django-squash.
from django-squash.
Hi! I'm sorry but I have since removed the project from my dependencies. We can close this issue as it stands. I'll test it out again with some other personal projects.
from django-squash.
Related Issues (10)
- Optional auto adding namespace the functions used in the code and reverse_code arguments of RunPython HOT 6
- Touches migrations inside site-packages HOT 4
- `rename_migrations` can fail if migration name does not start with 4 ints HOT 6
- Import issues
- Issue with RunPython functions being part of the class
- 6/site-packages/django_squash/apps.py", line 2, in <module> from django.db.migrations.serializer import Serializer HOT 2
- IndexError: list index out of range HOT 4
- Hello again, sorry I missed your answer. So I plan to reopen issue, cause I tried to squash my migrations again :) HOT 4
- Installed database extensions are not kept in the squashed migrations HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-squash.