You can certainly go that route and then upgrade to the other version
when you need something that is more upgrade-safe.
The main concern with touching the db schema directly is that you end
up with a significant amoutn of logic that needs to be unnecessarily
maintained in the event of an upgrade.
Best Wishes,
Chris Travers
On 1/2/07, Steve Jacobs <[EMAIL PROTECTED]> wrote:
> Before I got this message I had added a column employee_id to the parts
> table in Postgres using phpPgAdmin. I was then looking at the code to figure
> out how to add the field to the IC (parts and services form) and also how to
> add the function to the time card form. I am a little lost. I have almost
> never worked with Perl - I hack around with php all the time and have a good
> understanding of that. I have a couple of guys I know here who are Perl
> wizards though. I'll keep working on it.
> Steve
>
>
> On 02/01/07, Chris Travers <[EMAIL PROTECTED]> wrote:
> >
> > Hi Steve;
> > Use create_custom_field(ENT, NAME, TYPE) to create the custom field.
> > For example:
> > SELECT create_custom_field('parts', 'employee_id', 'text');
> >
> > Right now all custom fields should be text unless you want to make
> > them required fields becuase I don't have adequate null handling built
> > in.
> >
> > Then you will need to:
> > 1) Add the field to the form (ic.pl)
> > 2) If using 1.1, add lines like:
> > $form->run_custom_queries(OPERATION, ENT)
> > for example
> > $form->run_custom_queries('SELECT', 'parts');
> > where appropriate in 1.1 in IC.pm.
> > (1.2 has this done already)
> >
> > 3) Wherever else you want to filter by the field, you can add
> > appropriate logic to retrieve the custom fields and use them. I do
> > recommend however, that anywhere you add the run_custom_queries()
> > function, you send us a patch so you have less porting work to do for
> > future versions.
> >
> > run_custom_queries basically creates the SQL queries for the custom
> > fields and runs them. The OPERATION can be 'SELECT', 'INSERT', or
> > 'UPDATE' and ENT is the entity the fields are attached to. Right now
> > we recommend naming them after the db tables used. But this could be
> > used to create new entities for custom work.
> >
> > Best Wishes,
> > Chris Travers
> >
> >
> -------------------------------------------------------------------------
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> > opinions on IT & business topics through brief surveys - and earn cash
> >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > _______________________________________________
> > Ledger-smb-users mailing list
> > [email protected]
> >
> https://lists.sourceforge.net/lists/listinfo/ledger-smb-users
> >
>
>
>
> --
> Steve Jacobs
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>
> _______________________________________________
> Ledger-smb-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ledger-smb-users
>
>
>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Ledger-smb-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ledger-smb-users