db.commit()
@RegisterMigration(20, MIGRATIONS)
-def add_work_metadata_column(db):
+def add_metadata_column(db):
metadata = MetaData(bind=db.bind)
- media_file = inspect_table(metadata, 'core__mediafiles')
+ media_entry = inspect_table(metadata, 'core__media_entries')
- col = Column('work_metadata', MutationDict.as_mutable(JSONEncoded))
- col.create(media_file)
+ col = Column('metadata', MutationDict.as_mutable(JSONEncoded))
+ col.create(media_entry)
db.commit()
cascade="all, delete-orphan"
)
collections = association_proxy("collections_helper", "in_collection")
+ metadata = Column(MutationDict.as_mutable(JSONEncoded))
## TODO
# fail_error
name_id = Column(SmallInteger, ForeignKey(FileKeynames.id), nullable=False)
file_path = Column(PathTupleWithSlashes)
file_metadata = Column(MutationDict.as_mutable(JSONEncoded))
- work_metadata = Column(MutationDict.as_mutable(JSONEncoded))
__table_args__ = (
PrimaryKeyConstraint('media_entry', 'name_id'),