Jump to content
surfalot

[Contribution] Database Configurer for contributions

Recommended Posts

==================

Abstract

==================

 

This contribution is meant to help contribution uploaders manage

the database changes. It allows you to setup additions to the

configuration options, create configuration groups using the next

configuration group id number and place all the items in that new

group. It allows for adding configuration options to existing

configuration groups and to avoid removing groups if not all the

items were removed from the group.

 

It allows for table additions and field additions for existing

tables also.

 

The utility interface allows for complete removal of all items.

it also offers an update option that will refresh the titles and

descriptions of configuration options, but not the configuration

setting itself. It also allows for a "force" install that will

reset all the configuration items to the default installed values.

 

Provide a solution so that the contribution it is included with

can call a function that will return whether any items need to

be setup and whether any items have already been setup (partial

install or updating needed).

 

Get it [here]

Edited by surfalot

Share this post


Link to post
Share on other sites

surfalot , you amaze me , always having good idea, you are my santa ! :rolleyes:

 

the features seems intersting i could try to work with you on this and improve your work if i can

 

one question , when installing new contribution, often there are insert for the configuration table , when i copy paste to php myadmin in the sql section , wil lthey still works if their are new fields in the configurration table due to your contribution ?

 

i speak about a nice insert that specify the fields , for instance:

 

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3278,'Apply security features to registered customers','CFG_REGISTERED_WATERMARKS','Yes','If this option is set to no, all image security features will be disabled when a registered customer is browsing your site',333,4,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'Yes\', \'No\'),');


MS2

Share this post


Link to post
Share on other sites
surfalot , you amaze me , always having good idea, you are my santa ! :rolleyes:

 

the features seems intersting i could try to work with you on this and improve your work if i can

 

one question , when installing new contribution, often there are insert for the configuration table , when i copy paste to php myadmin in the sql section , wil lthey still works if their are new fields in the configurration table due to your contribution ?

 

i speak about a nice insert that specify the fields , for instance:

 

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (3278,'Apply security features to registered customers','CFG_REGISTERED_WATERMARKS','Yes','If this option is set to no, all image security features will be disabled when a registered customer is browsing your site',333,4,NULL,'2005-01-06 20:24:30',NULL,'tep_cfg_select_option(array(\'Yes\', \'No\'),');

I'm not quite sure what you are asking.

I think you are asking, if this code adds fields to the database, can you still add others manually (using phpMyAdmin) after that? yes.

using this code does not stop anyone from doing further changes in the database.

 

If this code is setup correctly it will only pay attention to the items that were setup in the code. Everything else in the database is ignored.

If you use this contribution to add 'CFG_REGISTERED_WATERMARKS' to the database, then try to run the SQL inserting the same config item name, there may be conflicts, or double entries. If you end up with double entries for that config item, running the "remove" option on the contribution will remove one of the entries on the first try and the second of the duplicate entries on the second removal try.

 

I'd love to have your help and feedback with this. I just got tired of trying to write instructions and having several confusing SQL files to run and all the noobs that don't know what phpMyAdmin is. I hope this will simplify that whole thing.

 

did that answer your question?

Share this post


Link to post
Share on other sites

New packages have been uploaded with new features, updates.   See the changelog for details.  Some highlights:

 

- Complete rewrite.
- Added page to allow a preview of all SQL commands that will be performed in an install or update.
- Added versioning that allows conditional database updates based on a stored contribution version.
- Converted the functions file to a class. Now properly containing data and functionality in a class.
- Added ability to preload new tables with static or example data.

 

 

Database Configurer v1.1.0 for osCommerce v2.2ms2 (all releases): http://addons.oscommerce.com/info/4894

Database Configurer v1.1.0 for osCommerce v2.3.x: http://addons.oscommerce.com/info/9108

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×