forked from CenterForOpenScience/osf.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/django_upgrade' of https://github.com/CenterFor…
…OpenScience/osf.io into signals-citation-styles * 'feature/django_upgrade' of https://github.com/CenterForOpenScience/osf.io: move createcachetable to post migrate signal (CenterForOpenScience#9944) # Conflicts: # osf/apps.py # osf/migrations/__init__.py
- Loading branch information
Showing
3 changed files
with
12 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,11 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import unicode_literals | ||
from django.db import migrations | ||
from django.conf import settings | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
('osf', '0155_merge_20190115_1437'), | ||
] | ||
operations = [ | ||
migrations.RunSQL([ | ||
""" | ||
CREATE TABLE "{}" ( | ||
"cache_key" varchar(255) NOT NULL PRIMARY KEY, | ||
"value" text NOT NULL, | ||
"expires" timestamp with time zone NOT NULL | ||
); | ||
""".format(settings.CACHES[settings.STORAGE_USAGE_CACHE_NAME]['LOCATION']) | ||
], [ | ||
"""DROP TABLE "{}"; """.format(settings.CACHES[settings.STORAGE_USAGE_CACHE_NAME]['LOCATION']) | ||
]) | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters