Skip to content

Releases: 3YOURMIND/django-migration-linter

1.4.1

Choose a tag to compare

@David-Wobrock David-Wobrock released this 09 Jan 19:49

Update testing dependencies (mysqlclient, Django 2.2 and black)

1.4.0

Choose a tag to compare

@David-Wobrock David-Wobrock released this 09 Jan 19:48
  • Add --include-migrations-from option to only consider migrations specified in a given file. No matter if the migrations are selected from a git commit or not, we only select the ones in the given file.
  • Add --quiet {ok,ignore,error} option to remove different or multiple types of messages from being printed to stdout.
  • Make detection of problematic table and column a bit more resilient for UX.
  • Add Python 3.8 to test matrix and update test dependencies.

Fixed bugs:

  • Handle adding many to many fields correctly.

1.3.0

Choose a tag to compare

@David-Wobrock David-Wobrock released this 30 Jul 08:48
  • Add --exclude-migration-tests option to ignore backward incompatible migration tests.
  • Do not falsely detect dropping NOT NULL constraint.
  • Detect DROP TABLE backward incompatible migration.
  • Detect adding a UNIQUE constraint as backward incompatible migration.
  • Handle when Django tries to generate the SQL of a migration but raises an exception because
    it cannot find the name of a certain constraint (because it has been dropped already).

Internal change:

  • Differentiate different database vendors during SQL analysis.

1.2.0

Choose a tag to compare

@David-Wobrock David-Wobrock released this 10 Jul 08:27
  • Add --unapplied-migrations and --applied-migrations mutually exclusive options
    in order to respectively lint only unapplied or applied migrations.
  • When loading migration starting from a git ref, cross the found migrations
    with the currently loaded migrations in the project.
  • Add --project-root-path which allows to specify the root path
    which is used for finding the .git folder. (thanks to @linuxmaniac)

1.1.0

Choose a tag to compare

@David-Wobrock David-Wobrock released this 19 May 21:01
  • Improve speed of ignored migration through the IgnoreMigration operation.
    Instead of generating their SQL, we verify if the Operation class is present.
    Thus we don't have to wait for the SQL generation. Also improves the caching strategy.

Breaks some internal APIs, so minor update to 1.1.0.

1.0.0

Choose a tag to compare

@David-Wobrock David-Wobrock released this 12 May 14:00

Breaking changes of the linter usage.

The linter now is a Django management command.
It should be used with a python manage.py lintmigrations followed by the usual options.
Additionally, the linter now needs to be added the to the INSTALLED_APPS in your Django settings.

  • The linter is now much faster: we don't setup django once for each migration
  • The linter is now more robust: we rely on Django internals to discover migrations
  • Clean up of the testing setup: it is cleaner, less brittle and we have more confidence that it works
  • Added support for Django 2.2
  • Dropped support for Python 3.4

Fixed bugs:

  • Made the cache database-dependent. Between multiple databases, some migrations would be considered correct while they are not on the used DB.
  • Adding an erroneous migration to the ignore list on the second run would get the migration content from the cache and not ignore it.

0.1.5

Choose a tag to compare

@David-Wobrock David-Wobrock released this 21 Apr 10:56

Bug fix: handle migration files with spaces in their name by quoting the migration name

0.1.4

Choose a tag to compare

@David-Wobrock David-Wobrock released this 24 Feb 17:31
  • Explicitly test for mysql, sqlite3 and postgresql
  • Fix alter column type detection in postgresql
  • Do not create cache folder when -no-cache option
  • Fix tests on Windows
  • Use the same Python interpreter as used for launching the linter, instead of manually trying to re-create the path

0.1.3

Choose a tag to compare

released this 29 Jan 16:57
  • Fixes migrations that are ignored to generate empty SQL, that PostgreSQL complains about. It throws an exception making migrations fail, that are in fact valid. (Thanks to @fevral13 and @mes3yd )

  • Add options -V and --version to show the current linter version

0.1.2

Choose a tag to compare

@David-Wobrock David-Wobrock released this 21 Jan 21:09
  • Bug fix: handle when the linter is called in the working dir django-migration-linter .
  • Bug fix: don't assume that the git root is at the same path as the django project