-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Description
I followed the setup instructions in the README for the django-ledger-starter template, but python manage.py migrate fails with an SQLite syntax error near None.
Steps to Reproduce
- Clone the starter repo:
git clone https://github.com/arrobalytics/django-ledger-starter.git cd django-ledger-starter - Install dependencies:
pip install pipenv pipenv install && pipenv shell - Run migrations:
python manage.py migrate
Expected Behavior
All migrations should apply successfully and create the necessary tables.
Actual Behavior
Migration fails at django_ledger.0026_stagedtransactionmodel_customer_model_and_more with:
django.db.utils.OperationalError: near "None": syntax error
Full Traceback (truncated)
Applying django_ledger.0026_stagedtransactionmodel_customer_model_and_more...Traceback (most recent call last):
...
sqlite3.OperationalError: near "None": syntax error
Environment
- OS: Windows 10
- Python: 3.11 (Anaconda)
- Django: Installed via pipenv (version from lockfile)
- Database: SQLite (default from starter project)
Notes
- Warning also appears before migrations:
UserWarning: You are using the deprecated behavior of django_ledger. - Error might be caused by a field default value or constraint in migration 0026 that renders invalid SQL in SQLite.
Possible Fix
Consider checking migration 0026 in django_ledger/migrations — it may contain a field with default=None or invalid SQL literal.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels