Opened 14 years ago

Closed 14 years ago

#118 closed enhancement (fixed)

Database config - other - configurable feature names

Reported by: adube Owned by:
Priority: major Milestone:
Component: server Version:
Keywords: Cc:

Description

Currently, the table names in the config driver have hardcoded values. This should be changed with having default values and the according getter and setter methods.

Also, since the table names are going to be change, for example :

from : datastore_options to : datastoreoption

the 'getRecords' method will have to be change accordingly as well.

Change History (1)

comment:1 by adube, 14 years ago

Resolution: fixed
Status: newclosed
Summary: Database config - other - configurable table namesDatabase config - other - configurable feature names

r839 and r840, featuring :

  • new get and set methods for the feature names
  • the table names are build from a prefix + featurename
  • by default, the prefix of the table is : mcconfig_ ( meaning MapContext Configuration )
  • table names were changed : all original 's' and '_' were removed and the above prefix was added, so for example the old mapcontext_resources table is now named mcconfig_mapcontextresource. This was changed to adjust to the table names automatically generated by Jango (when creating the schema for the GUI admin tool, see #117). Changes applied to all .sql files in the sample (schemas and sample data)
  • The methods in the new config driver file were reordered to be more classified
  • Important notice if you want to change a feature name : if a feature name is changed (by using the according set method), the according tables referring to this feature must have their name changed and also all references to any fields having the same name. For example, if we change resource to foo, we must change mcconfig_resource to mcconfig_foo but also mcconfig_resourceoption to mcconfig_foooption and mcconfig_mapcontextresource to mcconfig_mapcontextfoo and so on. Then, we must also change any field referring to the feature name, for example in mcconfig_mapcontextfoo we would need to change resource_id to foo_id and so on for all tables.
Note: See TracTickets for help on using tickets.