close Warning: Can't synchronize with repository "(default)" (The repository directory has changed, you should resynchronize the repository with: trac-admin $ENV repository resync '(default)'). Look in the Trac log for more information.

Changes between Version 5 and Version 6 of TracUpgrade


Ignore:
Timestamp:
2021-07-11T14:17:48-07:00 (3 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TracUpgrade

    v5 v6  
    1111Check whether your plugins are compatible with the version of Trac that you are upgrading to. Obsolete plugins listed in the [#VersionSpecificSteps version specific steps] below should be uninstalled or disabled.
    1212
    13 If you are upgrading to a minor release, plugin compatibility is usually not a concern because the Trac API rarely changes, and major features are usually not introduced, for minor releases.
    14 
    15 If your plugins are installed from [https://trac-hacks.org trac-hacks.org] you can check compatibility by looking for a tag on the project page corresponding to a major release (e.g. `1.2`). If you are unsure, you'll want to contact the plugin author or ask on the [trac:MailingList MailingList].
     13If you are upgrading to a minor release, plugin compatibility is usually not a concern because the Trac API is normally unchanged.
     14
     15If your plugins are installed from [https://trac-hacks.org trac-hacks.org] you can check compatibility by looking for a tag on the project page corresponding to a major release (e.g. `1.4`). If you are unsure, you'll want to contact the plugin author or ask on the [trac:MailingList MailingList].
    1616
    1717If you are running several Trac plugins it is good to test the upgrade and plugin functionality in a staging instance of your site before upgrading your production instance. Remember, plugin authors are responsible for Trac version compatibility and plugins can interact in unexpected ways. Your Trac instance may have a unique combination of plugins and therefore it's advised that you do some verification testing when making any changes to your site.
     
    2525=== 3. Update Trac and dependencies #UpdatetheTracCode
    2626
    27 The packages are available through several channels, as described in [trac:TracDownload]. If your Trac instance was installed through an operating system package manager or an installer on Windows, proceed with the standard steps that are appropriate for your operating system.
     27The packages are available through several channels, as described in [trac:TracDownload]. If your Trac instance was installed through an operating system package manager, proceed with the standard steps that are appropriate for your operating system package manager. If it was installed through a Windows installer, uninstall the old Trac package before installing new Trac package.
    2828
    2929If you are managing your Trac installation using command line tools, `pip` is the preferred tool to upgrade a Trac instance because it will uninstall the old version. The following command will upgrade your Trac installation using the package published to [https://pypi.python.org/pypi/Trac PyPI].
     
    3636
    3737{{{#!sh
    38 $ pip install --upgrade Trac==1.2.1
     38$ pip install --upgrade Trac==1.4.1
    3939}}}
    4040
     
    4343=== 4. Upgrade the Trac Environment #UpgradetheTracEnvironment
    4444
    45 Environment upgrades are not necessary for minor version releases unless otherwise noted. 
    46 
    47 On starting your web server after upgrading Trac, a message will be displayed for projects that need to be upgraded and the projects will not be accessible until the upgrade is run. 
     45Environment upgrades are not necessary for minor version releases unless otherwise noted.
     46
     47On starting your web server after upgrading Trac, a message will be displayed for projects that need to be upgraded and the projects will not be accessible until the upgrade is run.
    4848
    4949The upgrade is run using a [TracAdmin trac-admin] command:
     
    8585=== 7. Steps specific to a given Trac version #VersionSpecificSteps
    8686
     87==== Upgrading from Trac 1.4 to 1.5 #to1.5
     88
     89===== Python 2.7 no longer supported
     90
     91Upgrade Python to 3.5 or later.
     92
    8793==== Upgrading from Trac 1.2 to 1.4 #to1.4
    8894
     
    109115
    110116Content is now generated by using the Jinja2 template
    111 engine. You may want to verify that your plugins are
     117engine. You should verify that your plugins are
    112118compatible with this change.
    113 (TODO: expand...)
    114 
    115 If you customized the Trac templates, or the `site.html`
     119
     120If you customized the Trac templates, or the `site.html`
    116121template, you'll need to adapt that as well.
    117 (TODO: expand...) See [#CustomizedTemplates]
     122(TODO: expand...) See [#CustomizedTemplates]. Email [TracNotification#CustomizingContent notification templates] also need to
     123be adapted.
    118124
    119125===== New permission policies for Wiki and Ticket realms
    120126
    121 Since 1.3.2 there are new permission policies for the ticket and wiki systems. `DefaultTicketPolicy` allows an authenticated users with `TICKET_APPEND` or `TICKET_CHPROP` to modify the description of a ticket they reported. It also implements the pre-1.3.2 behavior of allowing users to edit their own ticket comments. [#Newpermissionspolicyforread-onlywikipages ReadonlyWikiPolicy], added in 1.1.2, is renamed to `DefaultWikiPolicy`. The new permission policies can be easily replaced with alternate implementations if the default behavior is not desired.
     127Since 1.3.2 there are new permission policies for the ticket and wiki systems. `DefaultTicketPolicy` allows an authenticated user with `TICKET_APPEND` or `TICKET_CHPROP` to modify the description of a ticket they reported. It also implements the pre-1.3.2 behavior of allowing users to edit their own ticket comments. [#Newpermissionspolicyforread-onlywikipages ReadonlyWikiPolicy], added in 1.1.2, is renamed to `DefaultWikiPolicy`. The new permission policies can be easily replaced with alternate implementations if the default behavior is not desired.
    122128
    123129If `[trac] permission_policy` has the default value `ReadonlyWikiPolicy, DefaultPermissionPolicy, LegacyAttachmentPolicy`, then `DefaultWikiPolicy, DefaultTicketPolicy` should be automatically appended to the list when upgrading the environment:
     
    138144Reports that display the error need to be modified to prefix the `description` column with the appropriate table name or alias. For example, if the `ticket` table is aliased as `t` (`ticket t` or `ticket AS t`), replace `description` with `t.description` if the report should use the ticket's `description` column.
    139145
    140 ===== Removed `<repostype>` and `<repospath>` arguments from TracAdmin `initenv` command
     146===== Removed `<repostype>` and `<repospath>` arguments from `trac-admin` `initenv` command
    141147
    142148The TracAdmin `initenv` command allowed the default repository to be specified using the third and fourth positional arguments of `initenv`:
    143 {{{
     149{{{#!sh
    144150initenv [<projectname> <db> [<repostype> <repospath>]]
    145151}}}
     
    159165* [https://trac-hacks.org/wiki/AttachmentNotifyPlugin AttachmentNotifyPlugin]: attachment notifications are sent in Trac 1.0.3 and later
    160166* [https://trac-hacks.org/wiki/DateFieldPlugin DateFieldPlugin]: see the **time** [TracTicketsCustomFields#AvailableFieldTypesandOptions custom field type]
    161 * [https://trac-hacks.org/wiki/FlexibleReporterNotificationPlugin FlexibleReporterNotificationPlugin]: [trac:CookBook/Notification/Subscriptions custom subscribers] can be implemented in the new extensible notification system 
     167* [https://trac-hacks.org/wiki/FlexibleReporterNotificationPlugin FlexibleReporterNotificationPlugin]: [trac:CookBook/Notification/Subscriptions custom subscribers] can be implemented in the new extensible notification system
    162168* [https://trac-hacks.org/wiki/GroupBasedRedirectionPlugin GroupBasedRedirectionPlugin]: the default handler can set as a user preference
    163169* [https://trac-hacks.org/wiki/GroupingAssignToPlugin GroupingAssignToPlugin]: groups and permissions can be used in the [TracWorkflow#BasicTicketWorkflowCustomization set_owner] workflow attribute
     
    185191If other permission policies are enabled, `trac.ini` will need to have `ReadonlyWikiPolicy` appended to the list of active `permission_policies`. See TracFineGrainedPermissions#ReadonlyWikiPolicy for additional details on the proper ordering.
    186192
     193===== Navigation Ordering Moved
     194
     195The mainnav and metanav configuration ordering have
     196been moved from `[trac]` `mainnav` and `[trac]` `metanav` to the `[mainnav]` and `[metanav]` sections. The ordering is now specified using the `order` attribute as described in [TracNavigation#nav-order TracNavigation].
     197
     198The new configuration values will be written to trac.ini on upgrade, preserving the navigation order for the environment. You may need to edit trac.ini
     199if you use a shared [TracIni#GlobalConfiguration global configuration].
     200For example, if you wish to specify the navigation ordering for several environments in `global.ini`, you'll
     201need to add the `[mainnav]` and `[metanav]` sections
     202in that file and delete those sections from each
     203environment's trac.ini.
     204
    187205==== Upgrading from Trac 0.12 to Trac 1.0 #to1.0
    188206
     
    223241Prior to 1.0, the owner field of new tickets always defaulted to `[ticket] default_owner` when the value was not empty. If the value was empty, the owner field defaulted to to the Component's owner. In 1.0 and later, the `default_owner` must be set to `< default >` to make new tickets default to the Component's owner. This change allows the `default_owner` to be set to an empty value if no default owner is desired.
    224242
     243===== Behavior of `* -> *` workflow transition
     244
     245The workflow transition `* -> *` must have the operation
     246`leave_status`. Due to a defect in Trac < 1.0.18
     247`leave_status` was not required, so it may be necessary
     248to add the operation when upgrading. The action will not
     249display for a `* -> *` transition if the action does
     250not have the `leave_status` operation.
     251
    225252==== Upgrading from older versions of Trac #OlderVersions
    226253