db: add initial local database persistence integration
Ref: #76 (closed)
- Add primary key to schema. We can't call
#save
without a primary key defined in the table - Add
persist
transaction step for Kaltura upload
This creates a MediaResources
Sequel
model that can be used in place of the previous Model
struct to hold the metadata we need to persist locally for media records.
A persist
step was added to facilitate this persistence more explicitly, and the persisted MediaResources
instance has a to_kaltura
method which can be called to serialize the data in a format expected for Kaltura upload.
Edited by Matt Critchlow