| 75 | ==== Q: Attachments are missing after upgrade |
| 76 | |
| 77 | **A:** Most likely db28.py failed. See #11370. Please report any additional information on the MailingList. |
| 78 | |
| 79 | You can try to create a `run-db28.py` script: |
| 80 | {{{#!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 | |
| 88 | from __future__ import with_statement |
| 89 | |
| 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:]) |
| 103 | }}} |
| 104 | |
| 105 | And then apply it to the broken environment: |
| 106 | {{{ |
| 107 | > python rundb28.py /path/to/broken/environment |
| 108 | }}} |