[ic] customizing IC's default SQL database tables

Gabe Burt interchange-users@lists.akopia.com
Thu May 17 18:42:01 2001


Thanks a lot for the advice, Dan. Two more things - what about making
new database tables? What about changing the default tables? Can I just
edit the .pgsql files? Also, should I delete the .txt files in
/products? And one more thing - how much can I change the databases
without them breaking on me? I would like to implement table key ID's
using database sequences. Okay, I lied, one more thing. How did you
figure out how to do this? I appreciate your help.

Gabe

--- Dan B <db@cyclonehq.dnsalias.net> wrote:
> At 08:48 PM 5/16/2001 -0700, you wrote:
> >I'm attempting to customize Interchange to fit my needs - namely
> adding
> >fields in the products and userdb database tables - and am having
> poor
> >luck. I'm using Postgresql-7.x on a Red Hat 6.2 machine.
> >
> >I've been using the "construct" store template to make my database
> >changes on, but I'm confused about what I need to edit to make the
> >changes and have Interchange register them and still work.
> >
> >Is this the best way to go about setting up Interchange to work with
> a
> >customized database setup?
> >
> >If so, what files should I be editing?
> >
> >I tried changing, relative to construct's root,
> /dbconf/pgsql/*.pgsql,
> >but wasn't successful with that. Then I tried to make a file with
> the
> >plain SQL statements for the creation of the database, and scratched
> >the .pgsql files altogether. I've also edited the /products/*.txt
> files
> >to match my customized database definitions. I then loaded my sql to
> >postgres, but when I tried to load interchange it dies with an error
> in
> >the configuration. Here is the exact error message when I entered
> >"interchange -i":
> 
> [spurious error messages deleted]
> 
> Try this:
> 
> 1. start with default template construct
> 2. add one field to database
>          psql -c "ALTER TABLE products ADD COLUMN foo VARCHAR(64);"
> 3. add said field to dbconf/pgsql/products.pgsql
> 4. make sure you're not importing from text db
>          touch products/products.sql
> 5. restart interchange
> 
> You can often skip step 2 if you replace step 4 with "add another
> column to 
> products/products.txt".
> 
> HTH,
> 
> Dan Browning, Cyclone Computer Systems, danb@cyclonecomputers.com
> 
> _______________________________________________
> Interchange-users mailing list
> Interchange-users@lists.akopia.com
> http://lists.akopia.com/mailman/listinfo/interchange-users


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/