Feature #29389

Provide simple code migration mechanism

Added by Bastian Waidelich about 10 years ago. Updated over 9 years ago.

Status:
Resolved
Priority:
Should have
Category:
-
Start date:
2011-08-31
Due date:
% Done:

100%

Estimated time:
PHP Version:
Has patch:
No
Complexity:

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

Related to TYPO3.Flow - Bug #37053: Code migration doesn't work on WindowsResolvedKarsten Dambekalns2012-05-10

Actions
#1

Updated by Bastian Waidelich about 10 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 about 10 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 about 10 years ago

  • Subject changed from Provide simple upgrade mechanism to Provide simple code migration mechanism
#4

Updated by Robert Lemke about 10 years ago

  • Target version changed from 1.0 beta 2 to 1.0.0
#5

Updated by Karsten Dambekalns about 10 years ago

  • Target version changed from 1.0.0 to 1.1
#6

Updated by Karsten Dambekalns over 9 years ago

  • Status changed from New to Accepted
  • Assignee set to Karsten Dambekalns
  • Has patch set to No
#8

Updated by Gerrit Code Review over 9 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 9 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 9 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 9 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 9 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 9 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 9 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF