[TYPO3-dev] Something like rake db::migrate_plugins

Christian Opitz christian.opitz at netzelf.de
Thu Jun 16 21:29:55 CEST 2011


Hi,

thanks for your replies! I didn't follow the thread anymore as there was 
some delay but meanwhile I wrote with Loek about it and these are my 
current thoughts on this topic:

As far as I could get it, the two extensions t3deploy and cliinstall 
(thank you Michael for sharing it) both use the EM-functionality 
(comparing, adding, altering of fields and tables) and I think this a 
great step forwards.

But we quite often have to rename fields and tables in order to keep the 
data - AFAIK the EM isn't capable for that. Sometimes I also have to 
move records from one table/field to another etc. That's why I thought 
that a solution like dbdeploy[1] would be nice - sth. that allows you to 
write, run and roll-back custom delta-scripts:

- A new extension (or an existing?) which provides a migrate-command for CLI
- Calling this would scan all extensions for a deltas-folder (or some 
other name)
- Then it get's the delta scripts from those folders which should be 
either .sql or .php (to also allow devs to also use php for deltas)
- Then it compares those files either against a table which contains all 
deltas that were already run
- Then it runs all the scripts that were not yet run in the order of 
theyr names (1.sql, 2.php...)
- When any of the scripts fail it should automatically roll-back the 
current run and exit with an error
- When everything worked fine, it shoull'd be possible to do a roll-back 
though (e.g. when sth. different fails)

I think with this the EM-migration is practical though - I just don't 
see when to invoke it (before running deltas or afterwards or both - 
probably should be configurable).

Anyway - this might be quite enthusiastic plans. For now I'll at first 
try  t3deploy and cliinstall :)

[1] http://dbdeploy.com/

Cheers,
Christian




More information about the TYPO3-dev mailing list