| 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 `rundb28.py` script: |
| 80 | {{{#!python |
| 81 | #!/usr/bin/python |
| 82 | from __future__ import with_statement |
| 83 | import sys |
| 84 | from trac.env import open_environment |
| 85 | from trac.upgrades.db28 import do_upgrade |
| 86 | |
| 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() |
| 93 | }}} |
| 94 | |
| 95 | And then apply it to the broken environment: |
| 96 | {{{ |
| 97 | > python rundb28.py /path/to/broken/environment |
| 98 | }}} |