1
0
mirror of https://github.com/django/django.git synced 2025-10-26 07:06:08 +00:00

Fixed #515 (again) - renamed "key" field in SQL cache to "cache_key" because

MySQL reserves "key".


git-svn-id: http://code.djangoproject.com/svn/django/trunk@695 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jacob Kaplan-Moss
2005-09-26 03:14:37 +00:00
parent a978dbe779
commit 871ffbe7ee
2 changed files with 11 additions and 10 deletions

View File

@@ -626,7 +626,8 @@ def createcachetable(tablename):
"Creates the table needed to use the SQL cache backend"
from django.core import db, meta
fields = (
meta.CharField(name='key', maxlength=255, unique=True, primary_key=True),
# "key" is a reserved word in MySQL, so use "cache_key" instead.
meta.CharField(name='cache_key', maxlength=255, unique=True, primary_key=True),
meta.TextField(name='value'),
meta.DateTimeField(name='expires', db_index=True),
)