diff options
author | Rodney Ewing <ewing.rj@gmail.com> | 2013-05-23 14:33:56 -0700 |
---|---|---|
committer | Rodney Ewing <ewing.rj@gmail.com> | 2013-05-24 18:16:53 -0700 |
commit | 8ad734afc677f2d8314981be08d9282d5d599c67 (patch) | |
tree | e57d9a2da531093e9a6c157dc9870437fa460200 /mediagoblin/db/migrations.py | |
parent | b75eb88fabdac4a9fdc863969ec9472110732607 (diff) | |
download | mediagoblin-8ad734afc677f2d8314981be08d9282d5d599c67.tar.lz mediagoblin-8ad734afc677f2d8314981be08d9282d5d599c67.tar.xz mediagoblin-8ad734afc677f2d8314981be08d9282d5d599c67.zip |
changed User model pw_hash field to nullable and added migrations
Diffstat (limited to 'mediagoblin/db/migrations.py')
-rw-r--r-- | mediagoblin/db/migrations.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mediagoblin/db/migrations.py b/mediagoblin/db/migrations.py index 2c553396..1f92417e 100644 --- a/mediagoblin/db/migrations.py +++ b/mediagoblin/db/migrations.py @@ -287,3 +287,14 @@ def unique_collections_slug(db): constraint.create() db.commit() + + +@RegisterMigration(11, MIGRATIONS) +def pw_hash_nullable(db): + """Make pw_hash column nullable""" + metadata = MetaData(bind=db.bind) + user_table = inspect_table(metadata, "core__users") + + user_table.c.pw_hash.alter(nullable=True) + + db.commit() |