Feature #29389
Provide simple code migration mechanism
Status: | Resolved | Start date: | 2011-08-31 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | Karsten Dambekalns | % Done: | 100% |
|
Category: | - | |||
Target version: | TYPO3 Flow Base Distribution - 1.1 | |||
PHP Version: | Complexity: | |||
Has patch: | No |
Description
For people up-/downgrading from one FLOW3 version to another, there should be some tool that executes required migrations etc.
This could be a simple FLOW3 CLI Command IMO.
Changes that need to replace code could be put in <Package>/Migrations/Php/Version<timestamp>.php
(just like Doctrine migrations.
A consequence of that would be that changes must not break CLI (at least after caches have been flushed).
Some issues/questions:
- Do we need to provide a downgrading mechanismn?
- How can we track from which to which version the user is up-/downgrading?
- Do we need some automatic backup solution if anything goes wrong?
Related issues
Associated revisions
[FEATURE] Code migration tool
This adds support for "code" migrations. As with database migrations,
steps needed to adjust existing code to changes done in some package
can be delivered in a migration file with said package.
A new command flow3:core:migrate can be used to apply migrations to
all packages still in need of that migration. The tool requires git
to be available and will work only on code in clean git working copies.
Change-Id: Id237481ae651f94f2ae93d73544efb94d9d19734
Resolves: #29389
Releases: 1.1
[TASK] Adjust the code migration for FLOW3 1.1
This tweaks the code migration a little to be more complete and
produce better readable output.
Change-Id: Icadf90477f4c3bb0f8f565d2ebe656c84f95db67
Related: #29389
Releases: 1.1
[TASK] Tweak code migration tool code and output
This makes the output of the code migration tool a little
more readable and shifts some parts of the code around to
clean it up.
Change-Id: I818e422f40cad7f8e036112dd5186caada143039
Related: #29389
Releases: 1.1
[FEATURE] Make migration of a single package possible
Now the option "--package-key" can be given to "core:migrate" to
migrate a single package.
This allows for migration of single packages, including those in the
"Framework" category, which are now skipped by default.
Change-Id: I75984fb77bfdea2d8284d278822e2e148b6a6bef
Related: #29389
Releases: 1.1
[BUGFIX] Make core:migrate work on Windows
On Windows redirection to /dev/null does not work. Also
some migrations would not be found due to useless type
casting.
Change-Id: If36ac839a194f2663aeabf4ba85cfb6321764679
Related: #29389
Releases: 1.1
History
#1 Updated by Bastian Waidelich almost 4 years ago
Bastian Waidelich wrote:
Some issues/questions:
- Do we need to provide a downgrading mechanismn?
Suggestion: Create up() and down() methods in some AbstractMigrations (also see Doctrine Migrations) and leave it to the implementation whether to support downgrade or not.
- How can we track from which to which version the user is up-/downgrading?
One solution would be to always execute all migrations in the right order.
Another solution could be to store the current version in some text(?) file after upgrading.
- Do we need some automatic backup solution if anything goes wrong?
Suggestion: flow3:upgrade (or whatever the command would be called) would do a dry run by default and inform the user that a backup of files and db has to be done first.
See also http://git.typo3.org/FLOW3/Packages/FLOW3.git?a=blob;f=Scripts/migrate.php;h=c355961a936331c078406147564d665319d28f72;hb=HEAD for reference.
#2 Updated by Karsten Dambekalns almost 4 years ago
Also nice is the way things are managed with Symfony 2. we should look at having something along those lines to ease working with "custom distributions"
http://symfony.com/doc/current/cookbook/workflow/new_project_git.html#cookbook-managing-vendor-libraries
#3 Updated by Robert Lemke almost 4 years ago
- Subject changed from Provide simple upgrade mechanism to Provide simple code migration mechanism
#4 Updated by Robert Lemke almost 4 years ago
- Target version changed from 1.0 beta 2 to 1.0.0
#5 Updated by Karsten Dambekalns almost 4 years ago
- Target version changed from 1.0.0 to 1.1
#6 Updated by Karsten Dambekalns over 3 years ago
- Status changed from New to Accepted
- Assigned To set to Karsten Dambekalns
- Has patch set to No
#7 Updated by Karsten Dambekalns over 3 years ago
Here is the concept: https://docs.google.com/document/pub?id=1ik5gp9TLfvV5yem04uSFkrOKBWIvPp-zGSgVrG9ePkY
#8 Updated by Gerrit Code Review over 3 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10124
#9 Updated by Gerrit Code Review over 3 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10124
#10 Updated by Gerrit Code Review over 3 years ago
Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10124
#11 Updated by Gerrit Code Review over 3 years ago
Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10124
#12 Updated by Gerrit Code Review over 3 years ago
Patch set 5 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10124
#13 Updated by Gerrit Code Review over 3 years ago
Patch set 6 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10124
#14 Updated by Karsten Dambekalns over 3 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset ed8fdeafc57bad85358c960daf2e7751ef161796.