Migration
Version 6 (Benjamin Mack, 2012-03-28 08:18)
| 1 | 1 | h1. Migration |
|
|---|---|---|---|
| 2 | 1 | ||
| 3 | 2 | Ingmar Schlecht | (needs to be updated.) |
| 4 | 2 | Ingmar Schlecht | |
| 5 | 1 | * Migration wizard for integrating contents of an uploads/.../ folder to the asset database |
|
| 6 | 1 | ** This has to be done on a per table/field base. Successful migration should be saved in some config var so the system will know where to use old or new relation handling |
|
| 7 | 1 | ** Copy files to a defined/selectable location, create asset records, merge duplicates, change relations from file names to a relation |
|
| 8 | 1 | ** Remove the uploads folder completely? Thus _all_ files are in fileadmin and not spread around and uploaded maybe multiple times. An option would be to move files into fileadmin/migrated_files/ - that's most likely all we can do. |
|
| 9 | 1 | * soft migration path: Only migrate extensions that are ready, administrators have full control. No automatic migration (except core tables maybe) |
|
| 10 | 1 | ** offer an easy API for accessing media data that can also handle the old way of relations. This will leave the decision to the admin, not the developer -> easier adoption |
|
| 11 | 1 | * Handling of _group_ fields in TCEforms/TCEmain has to be adjusted: for internal_type = _file_ or _file_reference_, there has to be additional code for handling new relations (this will only come into action for migrated fields, where the old code will not work anymore) |
|
| 12 | 1 | * Ingo: I'd go for a completely new system where we do not have to care about BC, will make a lot of things a lot easier. After all it's a new feature. The migration wizard needs to take care of the transition though. |
|
| 13 | 3 | Benjamin Mack | |
| 14 | 3 | Benjamin Mack | |
| 15 | 3 | Benjamin Mack | |
| 16 | 3 | Benjamin Mack | h1. Upgrading Prodedure for FAL |
| 17 | 6 | Benjamin Mack | |
| 18 | 1 | Upgrading from a pre-FAL to a FAL version of TYPO3 involves certain steps and depending on which steps have been done, the system is in a different state. |
|
| 19 | 5 | Benjamin Mack | |
| 20 | 3 | Benjamin Mack | h2. Step 1: Upgrade the source (normal TYPO3 update) |
| 21 | 5 | Benjamin Mack | |
| 22 | 3 | Benjamin Mack | * Updating the TYPO3 Source (i.e. by pointing your typo3_src symlink from the pre-FAL to the FAL version of TYPO3 or by executing a git pull on your typo3_src directory if you got it straight from the git repositories) |
| 23 | 3 | Benjamin Mack | * Updating the database structure (using the COMPARE and IMPORT steps of the Instal Tool->Database Analyser) |
| 24 | 3 | Benjamin Mack | Your installation is now in the "after source upgrade" state. |
| 25 | 3 | Benjamin Mack | Warning: |
| 26 | 3 | Benjamin Mack | |
| 27 | 1 | This is a dangerous state to be in, because when editors in your TYPO3 backend now edit tt_content records and click save, data could be lost (more precisely: image or media fields might get emptied, because the path/filename string that was saved in the group/internal_type=file fields would then be overridden with a 0 for the new IRRE file fields). |
|
| 28 | 3 | Benjamin Mack | |
| 29 | 3 | Benjamin Mack | h2. Step 2: FAL Upgrade Wizards |
| 30 | 5 | Benjamin Mack | |
| 31 | 3 | Benjamin Mack | Use the the Install Tool -> Upgrade Wizards to executed the following two upgrade wizards: |
| 32 | 3 | Benjamin Mack | |
| 33 | 3 | Benjamin Mack | create symlinks from fileadmin/pics pointing to uploads/pics/ and from fileadmin/media/ pointing to uploads/media/. |
| 34 | 3 | Benjamin Mack | |
| 35 | 3 | Benjamin Mack | ttContentUpgradeWizard (which actually upgrades fields in both tt_content and the pages table, even though the name only suggests that tt_content would be updated) |
| 36 | 3 | Benjamin Mack | |
| 37 | 3 | Benjamin Mack | ttContentUploadsUpgradeWizard (which updates fields related to the "File Links" aka uploads content element). |
| 38 | 1 | ||
| 39 | 3 | Benjamin Mack | Your installation is now in the "content migrated" state. At this point, not all content table (pages, tt_content) file fields are completely migrated to FAL. File fields of extensions and some file fields of the core (e.g. resources attached to sys_template records) are still missing, but everything is consistent again (that means the settings in the TCA now correspond to your data in the database tables again). |
| 40 | 1 | Note that it is no problem if some fields are still of the "old style" file fields with type=group/internal_type=file, as that type is handled exactly like before. The field type still stores files in a folder underneath uploads/ as configured for the specific field and leaves a comma separated list of filenames as value of the field in the database. The only difference is that after installation of FAL the user can select files from any (remote or local) storage as configured in FAL. But once the user clicks "save" in the TCEForm, the file is copied to the local uploads/ folder as before. |
|
| 41 | 5 | Benjamin Mack | |
| 42 | 3 | Benjamin Mack | h2. Changes in the output of content elements: |
| 43 | 5 | Benjamin Mack | |
| 44 | 3 | Benjamin Mack | The uploads/ content element has gotten a change |
| 45 | 3 | Benjamin Mack | TODO: |
| 46 | 3 | Benjamin Mack | |
| 47 | 3 | Benjamin Mack | Rename ttContentUpgradeWizard to something more meaningful as it actually updates both the pages (with media field) and the tt_content table (with image field) |
| 48 | 3 | Benjamin Mack | |
| 49 | 3 | Benjamin Mack | make the ttContentUpgradeWizard actually copy files instead of only correcting the references. |
| 50 | 3 | Benjamin Mack | |
| 51 | 3 | Benjamin Mack | Possibly provide a workaround for the dangerous |