Replace Paste.Content field by P.URL and FU.PasteID #75
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "sql"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR removes the polymorphic
Content
field (that contained a binary blob describing the paste content) with two dedicated fields for the pasteURL
orFileUpload
. In theFileUpload
case, the actual foreign key field is added onFileUpload.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.
Checkout
From your project repository, check out a new branch and test the changes.