Translations
Info
All page names need to be in English.
en da  de  fr  it  ja  km  nl  ru  zh

Extending typo3 tables

From TYPO3Wiki
Jump to: navigation, search


Sometimes you need to extend some existing TYPO3 table by one or more fields. You can edit the table using any tool you like and add required fields and usually nothing will break down (details?). However there is a somewhat "cleaner" and TYPO3ish approach, which ensure that nothing will break down in the future as well.

As an example we will expand database table fe_users with new field placeofbirth. We will do it by creating our own small simple extension. Don't be scared - there is a nice tool which does all of the work for us: kickstarter extension, because our small extension will not contain any sophisticated things.

  1. install the extension kickstarter
  2. in backend browse to Extension Manager Backend module.
  3. in the popup menu there is a new item: "Make new extension". Select it.
  4. choose extension name and type it to "Enter extension key" box. Click "Update.."
  5. click + sign next to the "Extend existing Tables"
  6. Select table you want to extend (Which table): fe_users
  7. Fill in the form:
    • Field name: placeofbirth
    • Field title: Place of Birth
    • Field type: String input
    • Uncheck Is Exclude-field
  8. Click "Update.." (the right one)
  9. Click "View result"
  10. Click "WRITE" - this will write the extension to the server
  11. install the extension (you can do it by clicking on Install near the gray point.)

That is it.