adamcharnock / django-hordak

Double entry accounting in Django
http://django-hordak.readthedocs.io
MIT License
231 stars 55 forks source link

Database constraint 'bank_accounts_are_asset_accounts' ineffective. #34

Closed p-baum closed 2 weeks ago

p-baum commented 5 years ago

Line 16 of migrations/0009_bank_accounts_are_asset_accounts.py defines this contraint:

CHECK (is_bank_account = FALSE OR _type = 'AS')

migrations/0015_auto_20170302_2109.py then proceeds to change the field name to type rendering the constraint ineffective.

This has been rectified in https://github.com/adamcharnock/django-hordak/pull/33

adamcharnock commented 1 month ago

Re-enabling this could be a breaking change if some people are doing odd things. Lets fix it in the 2.0 release.

adamcharnock commented 2 weeks ago

It appears that this is actually working correctly, given that we have a test to keep an eye on it.

I imagine the rename was also applied to the db check.