Commit Graph
125 Commits
Author SHA1 Message Date
David Wobrock 1925343f4a Move constants to specific file and remove unused import 2020-02-07 23:29:15 +01:00
David Wobrock e49f6dea9c Document, add to changelog the data migrations and rename to 'warnings-as-errors' (plural) 2020-02-07 23:29:15 +01:00
David Wobrock 71614bd377 Handle warning as error and exclude warning tests 2020-02-07 23:29:15 +01:00
David Wobrock d01875b3be add warnings and RunPython basic linting 2020-02-07 23:29:15 +01:00
David Wobrock d410d2c7ba Refactor some linting code to more intelligible conditions 2020-02-07 23:29:15 +01:00
David Wobrock d3fd1518ea Bump to version 1.5.0 2020-01-26 11:56:42 +01:00
David Wobrock 813c5c8690 Remove apache license headers in each file. The one full copy of the license at the root of the repo shall define the license for all source files. 2020-01-11 22:08:33 +01:00
David Wobrock 948717f6e4 Bump to version 1.4.1 2019-12-01 11:37:14 +01:00
David Wobrock e57abd292f Bump to version 1.4.0 2019-10-21 22:30:21 +02:00
David Wobrock 1d9f4b7b86 Make sqlite and mysql table and column detection a little bit more resilient for UX 2019-10-21 22:27:25 +02:00
David Wobrock a31282a4d8 Make base detection of table and column more resilient 2019-10-21 22:27:25 +02:00
David Wobrock 7fad69659c Refactor: move build_error_dict into the Analyser call, since it will be backend specific 2019-10-21 22:27:25 +02:00
David Wobrock 18c271101d Refactor: remove redundant function call 2019-10-21 22:27:25 +02:00
David Wobrock ceabb40a62 Change migration linting prints to use conditined methods 2019-10-21 22:25:52 +02:00
David Wobrock 3b8e86fdf7 Add 'quiet' to argparsing and pass it to the linter 2019-10-21 22:25:52 +02:00
David Wobrock 72f066e710 Add MessageType enum for differentiating messages 2019-10-21 22:25:52 +02:00
David Wobrock b252c203f5 Add logic that adding a unique constraint is only an error when the table has not been created in the same transaction 2019-10-21 22:25:01 +02:00
David Wobrock e6e8cc7525 Update migrations list file behaviour
Instead of using the file path when the git commit is not
added, use the file and the migrations list no matter if we select
all migrations or just from a certain git commit.
And unit tests :)
2019-10-12 15:53:18 +02:00
yongming dbebda65d9 Fix help in command line, fix read file 2019-10-10 22:50:17 +02:00
yongming adf61dd669 Add command to only check migration files in a given file 2019-10-10 22:50:17 +02:00
David Wobrock 14cafd017d Bump to version 1.3.0 2019-07-30 10:47:58 +02:00
David Wobrock 5c5507a4c3 Also catch specific mysql errors during sqlmigrate 2019-07-30 10:47:20 +02:00
David Wobrock a74a7497ad Catch exception if sqlmigrate fails
Because of missing constraint that Django cannot find and therefore drop.
2019-07-30 10:47:20 +02:00
David Wobrock e408cd2c5e Add SQL analyser logic for adding unique constraint 2019-07-30 10:47:20 +02:00
David Wobrock 4128c4b018 Add logic to detect DROP TABLE 2019-07-29 23:14:30 +02:00
David Wobrock eac9c5615f Refactor sql_analyser into multiple classes for simpler extension in the future 2019-07-29 21:05:12 +02:00
David Wobrock 19620d9996 Handle other strategy for sqlite in Django2.2 2019-07-29 21:05:12 +02:00
David Wobrock ef2052a7b0 Work on SQL Analyser module
* With database specific functions
* Functions that analyse the entire transaction
* Unit tests that only test this module
2019-07-29 21:05:12 +02:00
Viktor Danyliuk db3be19f64 fix NOT_NULL migration test to avoid catching "DROP NOT NULL" 2019-07-29 21:05:12 +02:00
David Wobrock 19e54bba09 Refactor duplicated code in sql_analyser 2019-07-28 12:28:56 +02:00
David Wobrock 7215afa4a4 Fix line too long (flake8) 2019-07-28 12:28:56 +02:00
David Wobrock 85b9abdbc3 Display information that a problem has been found but ignored (and therefore the migration is considered ok) 2019-07-28 12:28:56 +02:00
David Wobrock af4b11c563 Document (README & CHANGELOG) and rename option to 'exclude-migration-tests' 2019-07-28 12:28:56 +02:00
vladmalynych 579e7c68b4 Fix linter issue 2019-07-28 12:28:56 +02:00
vladmalynych 6bbf2a653c Fix linter 'line too long' 2019-07-28 12:28:56 +02:00
Vladyslav Malynych 8eede82a38 Exclude not critical test (#2)
* Exclude not critical test

* Add exclude-tests option

* Update documentation

* Clean forgotten print

* Improve Readme, with examples
2019-07-28 12:28:56 +02:00
David Wobrock e93d4ec4c7 Bump to version 1.2.0 and update CHANGELOG.md 2019-07-10 10:26:42 +02:00
Victor Seva c0d33dd579 support setting DJANGO_PROJECT_FOLDER via --project-root-path
settings file can be located in a subdirectory of the project
2019-07-10 10:20:14 +02:00
David Wobrock 19fe5b75fe Add logic to ignore applied or unapplied migrations 2019-06-06 22:54:08 +02:00
David Wobrock ba0704ef3a Always load migrations from database:
This enables us to detect if a migration has been applied to a certain database.
No matter if the migrations and detected from git or all, we always match them with the migrations found by Django.
2019-06-06 22:54:08 +02:00
David Wobrock 3273f1bdc4 Add exclusive options for linting only applied or unapplied migrations 2019-06-06 22:54:08 +02:00
David Wobrock 42a83f18a0 Bump version to 1.1.0 and add note in CHANGELOG 2019-05-19 22:51:54 +02:00
David Wobrock e23e46e3d4 IgnoreMigrationOp: add class comment to explain purpose of no-op 2019-05-19 22:32:41 +02:00
Tobias Krönke dcaa52a4da simplify IgnoreMigration operation 2019-05-19 22:29:02 +02:00
Tobias Kroenke 08e15b84ae satisfy black 2019-05-19 22:29:02 +02:00
Tobias Kroenke 48cba37764 remove migration ignore sql analysis 2019-05-19 22:29:02 +02:00
Tobias Krönke 12d0b7e9be obey max line length 2019-05-19 22:29:02 +02:00
Tobias Krönke 44a0c83897 simplify any statement 2019-05-19 22:29:02 +02:00
Tobias Krönke 859b4b3b1b fix tests 2019-05-19 22:29:02 +02:00
Tobias Krönke 3f5b7bdb9b make should_ignore_migration check for IgnoreMigration operation 2019-05-19 22:29:02 +02:00