Database backed configuration

I’ve committed some preliminary code to cvs that basically replaces the current define() based configuration with a snappy database backed configuration

The table schema goes like this

CREATE TABLE `config` (
  `key_` varchar(127) NOT NULL default '',
  `value_` text NOT NULL,
  `default_` text NOT NULL,
  `type_` enum('string','num','boolean','array','enum') NOT NULL default 'string',
  `desc_` text,
  `export_` varchar(127) default NULL,
   PRIMARY KEY  (`key_`)
) TYPE=MyISAM;

The array type is pretty nice as it allows to store complex structures like multi-dimensional arrays which are un-serialized when they leave the database, and will, hopefully, be serialized back to the db one day

Speaking of which, stay tuned for the next obvious step: gui-based configuration editing

Oh, I also upgraded to the latest MagpieRSS (0.71.1) and kses (0.2.2)

This entry was posted on Thursday, February 10th, 2005 at 10:41 pm and is filed under features, gregarius.

You can follow any responses to this entry through the RSS 2.0 feed.

You can skip to the end and leave a response. Pinging is currently not allowed.

3 Responses to 'Database backed configuration'

  1. 3 years, 8 months ago, Jason Airlie said:

    Please consider adding some sort of prefix to your table names. My webhost only gives me one database and eventually tables for the different apps I have installed will collide. Say gregarius_config and gregarius_item etc.?

  2. 3 years, 8 months ago, Marco said:

    Jason, I’ve added this feature February 2nd, 2005:

    * Added (preliminary) support for database table prefixes, as requested

    You’ll have to update from anon CVS if you wanna play with this feature already, or wait for the next file release (which should happen as soon as I have consolidated the gui-based config issue above, hopefully within a week of time.)

    -m

  3. 3 years, 8 months ago, Jason Airlie said:

    Doh! Forgot I’d submitted that. Thanks.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

captcha

Sponsored links

Mortgage Calculator | Mortgages | Loans | Loans | Mortgages