#75 Replace Paste.Content field by P.URL and FU.PasteID

Open
dsprenkels wants to merge 1 commits from sql into master
Owner

This PR removes the polymorphic Content field (that contained a binary blob describing the paste content) with two dedicated fields for the paste URL or FileUpload. In the FileUpload case, the actual foreign key field is added on FileUpload.PasteID.

While writing the migration code, it turned out that there seems to be a bug in GORM, where a nil pointer deference happens every time you try to drop a column. The unfortunate workaround is to not drop any columns.

This PR removes the polymorphic `Content` field (that contained a binary blob describing the paste content) with two dedicated fields for the paste `URL` or `FileUpload`. In the `FileUpload` case, the actual foreign key field is added on `FileUpload.PasteID`. While writing the migration code, it turned out that there seems to be a bug in GORM, where a nil pointer deference happens every time you try to drop a column. The unfortunate workaround is to not drop any columns.
mrngm was assigned by dsprenkels 2 months ago
dsprenkels added 1 commit 2 months ago
This pull request can be merged automatically.
You are not authorized to merge this pull request.
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

This pull request currently doesn't have any dependencies.

Loading…
There is no content yet.