comparison roundup/admin.py @ 3963:3230f9c88086

Fix race condition for key properties in rdbms backends [SF#1876683]
author Richard Jones <richard@users.sourceforge.net>
date Thu, 07 Feb 2008 03:28:34 +0000
parents d02aad94af5a
children 042ace5ddb7c
comparison
equal deleted inserted replaced
3962:41d297d7dcec 3963:3230f9c88086
14 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 14 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
15 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" 15 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS"
16 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, 16 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
17 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 17 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
18 # 18 #
19 # $Id: admin.py,v 1.109 2007-09-26 14:09:59 jpend Exp $ 19 # $Id: admin.py,v 1.110 2008-02-07 03:28:33 richard Exp $
20 20
21 '''Administration commands for maintaining Roundup trackers. 21 '''Administration commands for maintaining Roundup trackers.
22 ''' 22 '''
23 __docformat__ = 'restructuredtext' 23 __docformat__ = 'restructuredtext'
24 24
1331 'only)')%d 1331 'only)')%d
1332 else: 1332 else:
1333 print _(' %(description)s (%(name)s)')%d 1333 print _(' %(description)s (%(name)s)')%d
1334 return 0 1334 return 0
1335 1335
1336
1337 def do_migrate(self, args):
1338 '''Usage: migrate
1339 Update a tracker's database to be compatible with the Roundup
1340 codebase.
1341
1342 You should run the "migrate" command for your tracker once you've
1343 installed the latest codebase.
1344
1345 Do this before you use the web, command-line or mail interface and
1346 before any users access the tracker.
1347
1348 This command will respond with either "Tracker updated" (if you've
1349 not previously run it on an RDBMS backend) or "No migration action
1350 required" (if you have run it, or have used another interface to the
1351 tracker, or possibly because you are using anydbm).
1352
1353 It's safe to run this even if it's not required, so just get into
1354 the habit.
1355 '''
1356 if getattr(self.db, 'db_version_updated'):
1357 print _('Tracker updated')
1358 self.db_uncommitted = True
1359 else:
1360 print _('No migration action required')
1361 return 0
1362
1336 def run_command(self, args): 1363 def run_command(self, args):
1337 '''Run a single command 1364 '''Run a single command
1338 ''' 1365 '''
1339 command = args[0] 1366 command = args[0]
1340 1367

Roundup Issue Tracker: http://roundup-tracker.org/