email_verified.drop()
is_admin.drop()
+ db.commit()
+@RegisterMigration(19, MIGRATIONS)
+def drop_MediaEntry_collected(db):
+ """
+ Drop unused MediaEntry.collected column
+ """
+ metadata = MetaData(bind=db.bind)
+ media_collected= inspect_table(metadata, 'core__media_entries')
+
+ media_collected = media_collected.columns['collected']
+
+
+ media_collected.drop()
+
db.commit()
state = Column(Unicode, default=u'unprocessed', nullable=False)
# or use sqlalchemy.types.Enum?
license = Column(Unicode)
- collected = Column(Integer, default=0)
+
file_size = Column(Integer, default=0)
fail_error = Column(Unicode)
fail_metadata = Column(JSONEncoded)
-
transcoding_progress = Column(SmallInteger)
queued_media_file = Column(PathTupleWithSlashes)
-# GNU MediaGoblin -- federated, autonomous media hosting
+# GNU MediaGobli:n -- federated, autonomous media hosting
# Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS.
#
# This program is free software: you can redistribute it and/or modify
collection.items = collection.items + 1
Session.add(collection)
- media.collected = media.collected + 1
+
Session.add(media)
if commit:
if form.confirm.data is True:
entry = collection_item.get_media_entry
- entry.collected = entry.collected - 1
entry.save()
collection_item.delete()
# Delete all the associated collection items
for item in collection.get_collection_items():
entry = item.get_media_entry
- entry.collected = entry.collected - 1
entry.save()
item.delete()