aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/db/migrations.py
diff options
context:
space:
mode:
authorxray7224 <jessica@megworld.co.uk>2013-07-18 20:21:35 +0100
committerxray7224 <jessica@megworld.co.uk>2013-07-18 20:24:35 +0100
commit8ddd7769de7a90f71d8dd3e0cc2c491e51d76d47 (patch)
tree549d5ae23d3852068427e8c52ee61805f96ca87e /mediagoblin/db/migrations.py
parent89d5b44e0aee5845f816a89a9f8b3364940daea3 (diff)
downloadmediagoblin-8ddd7769de7a90f71d8dd3e0cc2c491e51d76d47.tar.lz
mediagoblin-8ddd7769de7a90f71d8dd3e0cc2c491e51d76d47.tar.xz
mediagoblin-8ddd7769de7a90f71d8dd3e0cc2c491e51d76d47.zip
Adds migration for OAuth1 tables
Diffstat (limited to 'mediagoblin/db/migrations.py')
-rw-r--r--mediagoblin/db/migrations.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/mediagoblin/db/migrations.py b/mediagoblin/db/migrations.py
index fe4ffb3e..4673e0ce 100644
--- a/mediagoblin/db/migrations.py
+++ b/mediagoblin/db/migrations.py
@@ -26,7 +26,9 @@ from sqlalchemy.sql import and_
from migrate.changeset.constraint import UniqueConstraint
from mediagoblin.db.migration_tools import RegisterMigration, inspect_table
-from mediagoblin.db.models import MediaEntry, Collection, User, MediaComment
+from mediagoblin.db.models import (MediaEntry, Collection, User, MediaComment,
+ Client, RequestToken, AccessToken,
+ NonceTimestamp)
MIGRATIONS = {}
@@ -379,3 +381,15 @@ def pw_hash_nullable(db):
constraint.create()
db.commit()
+
+
+@RegisterMigration(14, MIGRATIONS)
+def create_oauth1_tables(db):
+ """ Creates the OAuth1 tables """
+
+ Client.__table__.create(db.bind)
+ RequestToken.__table__.create(db.bind)
+ AccessToken.__table__.create(db.bind)
+ NonceTimestamp.__table__.create(db.bind)
+
+ db.commit()