Changes between Version 10 and Version 11 of TracFaq
- Timestamp:
- Mar 5, 2014, 1:57:00 AM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracFaq
v10 v11 77 77 **A:** Most likely db28.py failed. See #11370. Please report any additional information on the MailingList. 78 78 79 You can try to create a `run db28.py` script:79 You can try to create a `run-db28.py` script: 80 80 {{{#!python 81 #!/usr/bin/python 81 # -*- coding: utf-8 -*- 82 # 83 # Execute `do_upgrade` in trac/upgrades/db28.py 84 # 85 # Usage: python run-db28.py /path/to/tracenv 86 # 87 82 88 from __future__ import with_statement 83 import sys84 from trac.env import open_environment85 from trac.upgrades.db28 import do_upgrade86 89 87 env = open_environment(sys.argv[1]) 88 print 'Fixing attachments for environment', env.project_name, 'at', sys.argv[1] 89 with env.db_transaction as db: 90 cursor = db.cursor() 91 do_upgrade(env, None, cursor) 92 db.commit() 90 from trac.env import Environment 91 from trac.upgrades import db28 92 93 def main(args): 94 for arg in args: 95 env = Environment(arg) 96 with env.db_transaction as db: 97 cursor = db.cursor() 98 db28.do_upgrade(env, 28, cursor) 99 100 if __name__ == '__main__': 101 import sys 102 main(sys.argv[1:]) 93 103 }}} 94 104