from mediagoblin.db.extratypes import JSONEncoded
from mediagoblin.db.migration_tools import RegisterMigration, inspect_table
-from mediagoblin.db.models import (MediaEntry, Collection, User,
- MediaComment, Privilege)
+from mediagoblin.db.models import (MediaEntry, Collection, MediaComment, User,
+ Privilege)
MIGRATIONS = {}
class UserBan_v0(declarative_base()):
__tablename__ = 'core__user_bans'
- user_id = Column('id',Integer, ForeignKey(User.id), nullable=False,
+ user_id = Column(Integer, ForeignKey(User.id), nullable=False,
primary_key=True)
expiration_date = Column(Date)
reason = Column(UnicodeText, nullable=False)
elif u'delete' in form.action_to_resolve.data and \
report.is_media_entry_report():
deleted_media = report.media_entry
- Session.delete(deleted_media)
+ deleted_media.delete()
form.resolution_content.data += \
u"\n{mod} deleted the media entry.".format(
mod=request.user.username)