Spatie Media Library breaks with ->disabled()

There appears to be a bug when using Spatie Media Library with the ->disabled() method.
Saving the record throws an error, because it is trying to save the media to a column on the model (rather than in the media table)

 SpatieMediaLibraryFileUpload::make("my_download")
   ->disk('media')
   ->disabled(fn() :bool => false),

This yields error:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'my_download' in 'field list'

Once ->disabled() is removed the plugin works as intended.

plugin v. 3.2.93
Was this page helpful?