creating table prefixes by user config?

1 view
Skip to first unread message

Aaron Vegh

unread,
Mar 8, 2006, 2:19:27 PM3/8/06
to Php-Object...@googlegroups.com
Hi there,
I just received your message about the SOAP api docs, and I will look
into those soon. I mention that because I wonder if that's the answer
to my current problem.

As you're aware, I've launched this really frickin' cool GTD Manager
(http://gravity-gtd.sourceforge.net -- sorry, I can't help pluggin
this thing!), which is POG to the core. Now, in the midst of the great
response I'm receiving for the tool are very reasonable requests to
have me provide the option to give a prefix to the table names, the
better to allow certain folks to use Gravity in their ISP-hosted
environments.

At first blush I don't see an easy way to do this without mucking
about in POG's class code... something I'm very reluctant to do. Are
you aware of this issue, and if so, can you think of a way to
implement this?

Thanks!
Aaron.

Joel

unread,
Mar 8, 2006, 3:01:01 PM3/8/06
to Php Object Generator
Hi Aaron,

yes, i'm subscribed to the gravity group and i've the request you're
referring to as well ;)

i don't think soap is a good solution for your issue right now. A quick
fix would be to regenerate your objects using a prefix. i.e e.g instead
of having a "task" object, you can regenerate it as "gravity_task".
That way, the matching tables will have the "gravity" prefix. but that
entails refactoring your other code that references your objects i.e in
your controller and views.

Unfortunately, there currently isn't another way, but we might try to
implement this later on.

hope this helps

Aaron Vegh

unread,
Mar 8, 2006, 5:26:41 PM3/8/06
to Php-Object...@googlegroups.com
Thanks Joel...

I was afraid of that! In addition to making the conversion, of course,
I'll need to come up with a nifty script to upgrade existing users.
All in a day's work, eh? LOL

Cheers,
Aaron.

Reply all
Reply to author
Forward
0 new messages