Comments (8)
Can you please release a new version to have Django 3.1 support?
from django-test-migrations.
Django 3.1 support was added to the project in #123 and it's already present on master
(see last test
workflow run), but we need to release a new version of our package. Currently, I'm testing master
branch on a few bigger projects to be sure it works correctly
from django-test-migrations.
@mchels thank you for the report! 👍
I will investigate it whenever I find some time and prepare PR with fixes
from django-test-migrations.
For those on here that missed the release: v1.1.0 with Django 3.1 support was released.
from django-test-migrations.
I have run into https://code.djangoproject.com/ticket/31477 which gives an error
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/django_test_migrations/contrib/unittest_case.py", line 36, in setUp
self.migrate_from,
File "/usr/local/lib/python3.7/site-packages/django_test_migrations/migrator.py", line 46, in apply_initial_migration
sql.drop_models_tables(self._database, style)
File "/usr/local/lib/python3.7/site-packages/django_test_migrations/sql.py", line 32, in drop_models_tables
get_execute_sql_flush_for(connection)(database_name, sql_drop_tables)
TypeError: execute_sql_flush() takes 2 positional arguments but 3 were given
It's also in the django 3.1 release notes: https://docs.djangoproject.com/en/3.1/releases/3.1/#backwards-incompatible-changes-in-3-1. Potentially the fix is simply to remove this line
and remove
database_name
fromhttps://github.com/wemake-services/django-test-migrations/blob/master/django_test_migrations/sql.py#L32
but I am not sure.
I am also hitting
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/django_test_migrations/contrib/unittest_case.py", line 36, in setUp
self.migrate_from,
File "/usr/local/lib/python3.7/site-packages/django_test_migrations/migrator.py", line 47, in apply_initial_migration
sql.flush_django_migrations_table(self._database, style)
File "/usr/local/lib/python3.7/site-packages/django_test_migrations/sql.py", line 60, in flush_django_migrations_table
allow_cascade=False,
File "/usr/local/lib/python3.7/site-packages/django/db/backends/postgresql/operations.py", line 130, in sql_flush
style.SQL_KEYWORD('TRUNCATE'),
AttributeError: 'list' object has no attribute 'SQL_KEYWORD'
probably because the signature for sql_flush
has changed (also in https://docs.djangoproject.com/en/3.1/releases/3.1/#backwards-incompatible-changes-in-3-1). Compare
https://github.com/django/django/blob/3.0.9/django/db/backends/base/operations.py#L384
vs
https://github.com/django/django/blob/3.1/django/db/backends/base/operations.py#L392
I am not sure how to handle this one.
from django-test-migrations.
Would it be possible to push a release with the new Django version support reasonably soon? This is actually the only dependency blocking me from updating a Django project right now.
from django-test-migrations.
Has there been any movement on this? Currently the only thing holding us back from Django 3.1
from django-test-migrations.
@skarzi great news! Thankyou
from django-test-migrations.
Related Issues (20)
- Add `[email protected]` to the test matrix
- Python3.10 support
- Support `[email protected]`
- Can't handle squashed migrations HOT 1
- typing_extensions is still required in newer Python versions HOT 5
- Models from app state aren't compatible (Cannot assign "<A: A object (1)>": "B.a_fk" must be a "A" instance) HOT 5
- Migrations unrelated to the migration I want to test force the migration I want to test to run before I can test state differences HOT 1
- Migrations unrelated to the migration I want to test force the migration I want to test to run before I can test state differences HOT 2
- Checks failing on MariaDB HOT 1
- Inconsistent behaviour with data migration HOT 8
- Error when testing multiple schemas in django+postgres HOT 1
- Allow using shorthand names & __latest__ for MigrationTargets
- Deadlock when using pants, pytest and django-test-migrations HOT 1
- Cannot test migrations if there is a collation in the migrations HOT 8
- "Relation {table} does not exist" when creating using prototype model HOT 2
- django.db.utils.OperationalError: (1050, "Table 'bar' already exists") HOT 6
- truncate_plan should truncate each app separately HOT 3
- `through_fields` not reflected in test models
- Apply only specific app migrations HOT 2
- Keep initial data in database after migration test
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-test-migrations.