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 electricdusk2021-07-23 17:28:00 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
This PR removes the polymorphic
Contentfield (that contained a binary blob describing the paste content) with two dedicated fields for the pasteURLorFileUpload. In theFileUploadcase, 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.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.