Forums / Developer / Version control for database changes

Version control for database changes

Author Message

Magnus Hellman

Wednesday 17 August 2011 4:22:08 am

This is for all you version control users out there and how you go about handling your database changes when developing. I'm not sure what do to.

This is my scenario:

I have jumped into a project to implement forum functionality. I make a branch and start develop. I add a few classes, permissions and roles that affects the database. When I'm finished I could make packages for the classes in the admin siteaccess and add them to the versioning system. (It would be handy to install them via the CLI.)

As for the roles and permissions Jérôme suggest in his article Using Subversion with eZ Publish that one could make SQL dumps of the ezrole and ezpolicy_xx tables. For another developer to be able to merge with this, it would mean he/she needs to dump his/her local version of those tables as well, am I right? If so, how likely is this to cause a severe merging conflict?

Overall, would this be a good strategy? How are you guys dealing with this?

Your thoughts are much appreciated!

Gaetano Giunta

Friday 19 August 2011 3:57:31 am

I'm afraid there is no silver bullet at the moment for versioning roles and policies in eZ...

While you wait for the packaging system to catch up you might find useful extensions such as ggsysinfo (shows "report"pages with complete lists of roles and policies and class definitions) or xmlinstaller (can import roles and policies from xml files)

Principal Consultant International Business
Member of the Community Project Board

Magnus Hellman

Friday 19 August 2011 7:48:24 am

Thanks Gaetano, I will take a closer look at them. Anything that can reduce mouse clicks in the admin siteaccess and help automate this process is really helpful.

eZ debug

Timing: Jan 17 2025 22:59:17
Script start
Timing: Jan 17 2025 22:59:17
Module start 'content'
Timing: Jan 17 2025 22:59:19
Module end 'content'
Timing: Jan 17 2025 22:59:19
Script end

Main resources:

Total runtime1.7687 sec
Peak memory usage4,096.0000 KB
Database Queries195

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0092 588.8516180.8359
Module start 'content' 0.00921.5508 769.6875545.7422
Module end 'content' 1.56000.2086 1,315.4297332.7422
Script end 1.7686  1,648.1719 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00390.2224210.0002
Check MTime0.00150.0824210.0001
Mysql Total
Database connection0.00110.061010.0011
Mysqli_queries1.686795.36631950.0086
Looping result0.00230.13071930.0000
Template Total1.716897.120.8584
Template load0.00240.135420.0012
Template processing1.714496.929520.8572
Template load and register function0.00020.013610.0002
states
state_id_array0.00220.122010.0022
state_identifier_array0.00210.116820.0010
Override
Cache load0.00200.1158180.0001
Sytem overhead
Fetch class attribute can translate value0.00120.065930.0004
Fetch class attribute name0.00120.067150.0002
XML
Image XML parsing0.00330.187230.0011
class_abstraction
Instantiating content class attribute0.00000.000760.0000
General
dbfile0.00950.5378330.0003
String conversion0.00000.000330.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/link.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/link.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 13
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs