-
-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(attachments): add xform and user fields to Attachment model TASK-927 #5575
feat(attachments): add xform and user fields to Attachment model TASK-927 #5575
Conversation
…5571) ### 🗒️ Checklist 1. [X] run linter locally 2. [X] update all related docs (API, README, inline, etc.), if any 3. [X] draft PR with a title `<type>(<scope>)<!>: <title> TASK-1234` 4. [X] tag PR: at least `frontend` or `backend` unless it's global 5. [X] fill in the template below and delete template comments 6. [X] review thyself: read the diff and repro the preview as written 7. [X] open PR & confirm that CI passes 8. [X] request reviewers, if needed 9. [ ] delete this section before merging ### 💭 Notes Error from #5568. The Leaflet library needs to have the L object imported before other leaflet imports. ### 👀 Preview steps 1. ℹ️ have an account and a project 2. Navigate to the Project Summary page 4. 🔴 [on main] notice that if you click on "Data" or "Settings", an error message is shown 5. 🟢 [on PR] notice that you can click on and view the "Data" and "Settings" pages
migrations.AddField( | ||
model_name='attachment', | ||
name='user', | ||
field=models.ForeignKey( | ||
blank=True, | ||
null=True, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
related_name='attachments', | ||
to=settings.AUTH_USER_MODEL, | ||
), | ||
), | ||
migrations.AddField( | ||
model_name='attachment', | ||
name='xform', | ||
field=models.ForeignKey( | ||
blank=True, | ||
null=True, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
related_name='attachments', | ||
to='logger.xform', | ||
), | ||
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This migration should only contain change to the Attachment model. Remove all other changes that Django has detected (because misc differences between your environment and the production).
Please change the name of the file too to make it obvious about the changes we are applying.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
👀 Preview steps
./manage.py dbshell --database kobocat
\d logger_attachment