aboutsummaryrefslogtreecommitdiffstats
path: root/pysite/migrations
diff options
context:
space:
mode:
authorGravatar Gareth Coles <[email protected]>2018-05-15 20:17:53 +0100
committerGravatar Gareth Coles <[email protected]>2018-05-15 20:17:53 +0100
commit10ddcbea3732b1c066458aea533480f2bb399ef5 (patch)
treeef721816385f4e049bd3271f7824bbfbe85285d7 /pysite/migrations
parentMain site redirects should be 302s (diff)
Add snowflake index on oauth_data and use it for deletions
We were using id previously, but that was no longer the correct key
Diffstat (limited to 'pysite/migrations')
-rw-r--r--pysite/migrations/tables/oauth_data/__init__.py0
-rw-r--r--pysite/migrations/tables/oauth_data/v1.py3
2 files changed, 3 insertions, 0 deletions
diff --git a/pysite/migrations/tables/oauth_data/__init__.py b/pysite/migrations/tables/oauth_data/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/pysite/migrations/tables/oauth_data/__init__.py
diff --git a/pysite/migrations/tables/oauth_data/v1.py b/pysite/migrations/tables/oauth_data/v1.py
new file mode 100644
index 00000000..8448d8e5
--- /dev/null
+++ b/pysite/migrations/tables/oauth_data/v1.py
@@ -0,0 +1,3 @@
+def run(db, table, table_obj):
+ db.run(db.query(table).index_create("snowflake"))
+ db.run(db.query(table).index_wait("snowflake"))