Initialization v/s Update


Lets understand Update and initialization


Initialization

We can do initialization of hybris system in 2 ways

1)Using ant initialize command from command prompt

2)Directly through Hybris Administration console(HAC)

Initialize does the following things

Removes all the existing data

Drops all the existing schema and tables

Recreates the schema and tables

Reload the data(seed data given by hybris, we can also load our own data)

Note:

All the data available in DB will be lost after initialization
ant_initialize

we can observe that entire DB is cleared first and then recreated it from the scratch.
Also after recreating we can see that custom data is lost.

Update

We can do update of hybris system in 2 ways

1)Using ant updatesystem command from command prompt

2)Directly through Hybris Administration console(HAC)

Update does the following things

it will just modify the changes requested,it will not clear any existing data or tables.

If we are requesting to create the new tables or columns,update will do that without modifying any other details in DB.

So update will be faster than initialize

Note:

Existing data will not be lost if we do Update.
ant_update

we can observe that existing schema,tables and columns are retained as it is and then added the requested tables and columns.

Also after update we can see that custom data is preserved.

initialize operation should be used only on the first time of hybris installation or in some situation which demands it(like database might be corrupted) but make sure to take a backup of data before doing it.

About the Author

Founder of javainsimpleway.com
I love Java and open source technologies and very much passionate about software development.
I like to share my knowledge with others especially on technology 🙂
I have given all the examples as simple as possible to understand for the beginners.
All the code posted on my blog is developed,compiled and tested in my development environment.
If you find any mistakes or bugs, Please drop an email to kb.knowledge.sharing@gmail.com

Connect with me on Facebook for more updates

Share this article on