| | 77 | == Notes == |
| | 78 | site-packages\django\db\backends\base\shema.py {{{ def effective_default(self, field): }}} |
| | 79 | |
| | 80 | determines default as an empty <class 'str'>, when {{{(default = '')}}} |
| | 81 | |
| | 82 | == Possible Fix? == |
| | 83 | site-packages\django\db\backends\base\shema.py ~line 197 |
| | 84 | |
| | 85 | {{{ |
| | 86 | def effective_default(self, field): |
| | 87 | if field.has_default(): |
| | 88 | default = field.get_default() |
| | 89 | if field.get_internal_type() == "BinaryField" and not default: |
| | 90 | default = six.binary_type() |
| | 91 | elif not field.null and field.blank and field.empty_strings_allowed: |
| | 92 | if field.get_internal_type() == "BinaryField": |
| | 93 | default = six.binary_type() |
| | 94 | else: |
| | 95 | default = six.text_type() |
| | 96 | elif getattr(field, 'auto_now', False) |
| | 97 | }}} |