I'd use a nosql database or the xml feature of PostgreSQL/Oracle/... or
just have a large column that takes JSON.

Am 2011-12-22 20:01, schrieb bill hauck:
Hi.

I'm building an application--project management system--that I'd like to have 
the application administrators to be able to create custom fields for various 
tables after deployment.

For instance, instead of including a hard-coded field for every possible IM or chat system out 
there, I'd like the admins to be able to decide they only care about AIM and Skype, so they'd add 
"aim_name" and "skype_name" fields.  Other installations and admins might 
decide they only care about gtalk and facebook so they'd add those fields.

The other issue is that I don't want to simply add 10 extra fields and give the 
admins control of the display name.  I'd like to essentially have a secondary 
table that holds the custom fields for that table's primary table. So ...

The person table has a person_custom table to hold the custom fields and data.
The project table has a project_custom table to hold the custom fields and data.
Etc.

So my question really is what's the best approach?  A secondary table for every 
table I want custom fields for?  Or a set of static tables where the first 
holds the field information and the second holds the data related to those 
fields?  or is there a completely different way I'm not thinking of?

For the first way, custom table per table, how do I make DBIx::Class work with 
that?  I don't want to have to run the model creation script after adding or 
modifying a custom field; I'd like to have the field available on the fly.  Do 
I have to give up DBIC for the custom tables?

Any info is greatly appreciated.

Thanks,

bill


_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
T-Systems Austria GesmbH Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
Notice: This e-mail contains information that is confidential and may be 
privileged.
If you are not the intended recipient, please notify the sender and then
delete this e-mail immediately.
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*

_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Reply via email to