aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/db/migrations.py
diff options
context:
space:
mode:
authortilly-Q <nattilypigeonfowl@gmail.com>2013-10-03 17:07:11 -0400
committertilly-Q <nattilypigeonfowl@gmail.com>2013-10-03 17:07:11 -0400
commit0a24db84c5769149537b0d9bd8e3a88fe8e9522a (patch)
treed99a38cfc322fa643d2d0cc4a739a8ccb4e538ca /mediagoblin/db/migrations.py
parent9519c0a91f6c67883d62b656c971cc10e47ea967 (diff)
downloadmediagoblin-0a24db84c5769149537b0d9bd8e3a88fe8e9522a.tar.lz
mediagoblin-0a24db84c5769149537b0d9bd8e3a88fe8e9522a.tar.xz
mediagoblin-0a24db84c5769149537b0d9bd8e3a88fe8e9522a.zip
This was a very important update where I fixed a few small but fatal bugs in my
code. I had removed the import of Privilege in mediagoblin.db.migrations, and this was still necessary and was causing errors. I also made it so that media deletion by moderators, through reports, actually fully deleted the media, rather than just deleting the database representation of the media. Lastly, I fixed a bug in migration that caused a fatal error on login because the UserBan user_id column was improperly named in it's creation by migration.
Diffstat (limited to 'mediagoblin/db/migrations.py')
-rw-r--r--mediagoblin/db/migrations.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/mediagoblin/db/migrations.py b/mediagoblin/db/migrations.py
index 6e644c3a..7011d842 100644
--- a/mediagoblin/db/migrations.py
+++ b/mediagoblin/db/migrations.py
@@ -28,8 +28,8 @@ from migrate.changeset.constraint import UniqueConstraint
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 = {}
@@ -506,7 +506,7 @@ class MediaReport_v0(ReportBase_v0):
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)