Changes between Version 8 and Version 9 of PluginDevelopmentGuide


Ignore:
Timestamp:
08.04.2013 17:16:28 (12 years ago)
Author:
jri
Comment:

Migrations introduction

Legend:

Unmodified
Added
Removed
Modified
  • PluginDevelopmentGuide

    v8 v9  
    367367 
    368368This stops all bundles, shuts down the webserver, and the database. 
     369 
     370== Migrations == 
     371 
     372A //migration// is a sequence of database operations that is executed exactly once in the lifetime of a particular DeepaMehta installation. You as a developer are responsible for equipping your plugin with the required migrations. Migrations serve several purposes: 
     373 
     3741. Define the plugin's data model. That is, storing new topic type definitions and association type definitions in the database. E.g. a //Books// plugin might define the Book, Title, and Author types. 
     375 
     3762. A newer version of your plugin might extend or modify the data model defined by the previous version of your plugin. The migration of the updated plugin change the stored type definitions //and// transforms existing content if necessary. 
     377 
     3783. The application logic of a newer version of your plugin changes in a way it is not compatible anymore with the existing database content. The migration must transform the existing content then. 
     379 
     380So, the purpose expressed in points 2. and 3. is to make your plugin //upgradable//. That is, keeping existing database content //in-snyc// with the plugin logic. By providing the corresponding migrations you make your plugin //compatible// with the previous plugin version.