Santosh Pashupati
Santosh Pashupati

Reputation: 519

What does Platform Update do in Hybris?

I am new to Hybris and was following the Commerce trail given in Hybris wiki. I can see that they perform "Update" under "Platform" tag. What does this operation do ?

Upvotes: 3

Views: 3224

Answers (2)

Nirmal Mangal
Nirmal Mangal

Reputation: 812

From the above link. for people who do not have wiki access or if page moves.

Update

During an update, type system definitions are modified to match the new type system definition in the items.xml files.

First and foremost, the update mechanism makes sure that all data that existed in the system before the update is still accessible after the update.

Therefore:

•Update preserves the table name, to which a type was mapped, even if it was changed in items.xml

•Update preserves the column name, to which an attribute was mapped, even if it was changed in items.xml •Update preserves the column type for an attribute, even if it was changed in items.xml

•Update does not drop any tables and columns

•Update does not delete any item data, including type instances and type system data (composed types etc.)

•Update drops and recreate indices, if they are added or changed in items.xml

•Update does NOT change the attribute from optional to mandatory, even if it was changed in items.xml

This is what the process looks like:

1.The type system definitions from all extensions items.xml files are read in.

2.The hybris Commerce Suite type system in the database is modified according to the type definitions of all extensions items.xml files.

A. Adding newly defined types to the type system definition in the database. Type definitions and attribute definitions that are not part of the type system definition in the database are added.

B. Modifying existing types to match the type system definition in the database. Type definitions and attribute definitions that are changed compared to the type system definition in the database are modified.

C. Again, like in the init process, the old update logic (prior to hybris Commerce Suite 5.1) iterates through extensions and uses extension manager methods to create and modify types. Whereas, in the new update (since hybris Commerce Suite 5.1), ddl and dml scripts are also generated here.

D. Update then continues with creating essential and project data, optionally, if selected.

Upvotes: 6

Danny Gloudemans
Danny Gloudemans

Reputation: 2677

As you have access to the hybris wiki you should check the following URL: https://wiki.hybris.com/display/release5/Initializing+and+Updating+the+hybris+Commerce+Suite

Here you will find everything about the initialize and update functionality in the hAC of hybris.

Upvotes: 5

Related Questions