Skip to content

Commit 1dfdc29

Browse files
author
Richard Jones
committed
Don't run old code on newer database
1 parent 4e6f682 commit 1dfdc29

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Fixed:
2121
- Make WSGI handler threadsafe (sf #1968027)
2222
- Improved URL matching RE (sf #2038858)
2323
- Allow binary file content submission via XML-RPC (sf #1995623)
24+
- Don't run old code on newer database (sf #1979556)
2425

2526

2627
2008-03-01 1.4.4

roundup/backends/rdbms_common.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
#$Id: rdbms_common.py,v 1.198 2008-08-07 05:53:14 richard Exp $
18+
#$Id: rdbms_common.py,v 1.199 2008-08-18 06:25:47 richard Exp $
1919
""" Relational database (SQL) backend common code.
2020
2121
Basics:
@@ -254,6 +254,9 @@ def upgrade_db(self):
254254
Return boolean whether we need to save the schema.
255255
"""
256256
version = self.database_schema.get('version', 1)
257+
if version > self.current_db_version:
258+
raise DatabaseError('attempting to run rev %d DATABASE with rev '
259+
'%d CODE!'%(version, self.current_db_version))
257260
if version == self.current_db_version:
258261
# nothing to do
259262
return 0

0 commit comments

Comments
 (0)