Skip to content

Commit

Permalink
0.13dev: Follow-up to [10581], added missing file.
Browse files Browse the repository at this point in the history
git-svn-id: http://trac.edgewall.org/intertrac/log:/trunk@10582 af82e41b-90c4-0310-8c96-b1721e28e2e2
  • Loading branch information
rblank committed Feb 22, 2011
1 parent 488c122 commit 3577874
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions trac/upgrades/db27.py
@@ -0,0 +1,15 @@
from trac.db import Table, Column, DatabaseManager

def do_upgrade(env, ver, cursor):
"""Modify the cache table to use an integer id."""
# No need to keep the previous content
cursor.execute("DROP TABLE cache")

table = Table('cache', key='id')[
Column('id', type='int'),
Column('generation', type='int'),
Column('key'),
]
db_connector, _ = DatabaseManager(env).get_connector()
for stmt in db_connector.to_sql(table):
cursor.execute(stmt)

0 comments on commit 3577874

Please sign in to comment.