Skip to content

Conversation

@dimmastro
Copy link

Update 0004_create_user_plans.py

#192

Error in:

Running migrations:
Applying plans.0001_initial... OK
Applying plans.0002_auto_20180901_1744... OK
Applying plans.0003_make_plans_unique... OK
Applying plans.0004_create_user_plans...Traceback (most recent call last):
File "/opt/homebrew/lib/python3.10/site-packages/django/db/backends/utils.py", line 105, in _execute
return self.cursor.execute(sql, params)
File "/opt/homebrew/lib/python3.10/site-packages/django/db/backends/sqlite3/base.py", line 354, in execute
return super().execute(query, params)
sqlite3.OperationalError: no such column: plans_plan.updated_at

 django-getpaid#192)

Update 0004_create_user_plans.py

django-getpaid#192

Error in:

Running migrations:
  Applying plans.0001_initial... OK
  Applying plans.0002_auto_20180901_1744... OK
  Applying plans.0003_make_plans_unique... OK
  Applying plans.0004_create_user_plans...Traceback (most recent call last):
  File "/opt/homebrew/lib/python3.10/site-packages/django/db/backends/utils.py", line 105, in _execute
    return self.cursor.execute(sql, params)
  File "/opt/homebrew/lib/python3.10/site-packages/django/db/backends/sqlite3/base.py", line 354, in execute
    return super().execute(query, params)
sqlite3.OperationalError: no such column: plans_plan.updated_at
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.17%. Comparing base (2b06522) to head (b1fe97f).
⚠️ Report is 3 commits behind head on master.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #208      +/-   ##
==========================================
- Coverage   86.29%   86.17%   -0.13%     
==========================================
  Files          67       67              
  Lines        2496     2496              
==========================================
- Hits         2154     2151       -3     
- Misses        342      345       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@PetrDlouhy
Copy link
Collaborator

@dimmastro Thank you very much for contribution to this project, your help is appreciated.

Though I am not sure, this is a proper fix of the issue, not just workaround. I think that creating UserPlans was there in the migration for some reason and we can't just comment it out. Why do you think this is safe?

I see a problem with this migration not using get_model() (https://docs.djangoproject.com/en/5.2/topics/migrations/#accessing-models-from-other-apps) which might cause the error, but I am not sure it would work with abstract models.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants