Commit Graph
20 Commits
Author SHA1 Message Date
Christian Bundy 397c1f0e16 Default ends_with_default to False
Problem: Previously in gh-117 we aimed to solve gh-115, which described a problem where we used `SET DEFAULT` and then `DROP DEFAULT` immediately afterward. The solution was to track whether any defaults are retained, but the `ends_with_default` variable is initialized as `None` rather than `False`. At the end of the function we check whether `ends_with_default is False`, never occurs unless a default is set.

Solution: Assume that there is no default unless proven otherwise, and iniitializie `ends_with_default` to `False` instead of `None`.

Fixes: gh-158
2021-08-14 15:22:24 +02:00
David Wobrock fa56196f04 Add PG reindex linting warning and improve some smaller stuff 2021-06-19 18:15:40 +02:00
David Wobrock 27e492996c Apply black 2021-06-19 18:15:40 +02:00
David Wobrock 2bf87c0659 Add Postgresql warning when using DROP INDEX without CONCURRENTLY keyword 2021-06-19 18:15:40 +02:00
David Wobrock 343d163c88 Add Postgresql warning when using CREATE INDEX without CONCURRENTLY keyword 2021-06-19 18:15:40 +02:00
David Wobrock 9ea8872a29 Add warnings type to SQL analyser 2021-06-19 18:15:40 +02:00
David-Wobrock d207bf14b3 Fix import order which was important 2020-11-30 21:58:28 +01:00
David-Wobrock e51073ef46 Fixes #129 - use single logger 2020-11-30 21:53:38 +01:00
David-Wobrock 6ab1d58c47 Apply isort to the project 2020-11-30 21:46:40 +01:00
David Wobrock b3816613d5 Fix #115 -- Detect correctly if a field ends with a default value or a dropped default 2020-06-20 18:08:16 +02:00
David Wobrock 71614bd377 Handle warning as error and exclude warning tests 2020-02-07 23:29:15 +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 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 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 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