Forum OpenACS Development: Import selected database models

Collapse
Posted by Iuri Sampaio on
Having to services running individually,
how's possible to grab few tables from one and upload to another without break anything?
Collapse
Posted by Iuri Sampaio on
Having "2, two, II", services running individually,
how's possible to grab few tables from one and upload to another without break anything?
Collapse
Posted by Matthew Dodwell on
Iuri,

I've just written a couple of fairly generic import / export routines that use a table__new() function to insert, thus moving the data without the table_id's. Let me know if these would be of any use to you...

I would like to have a place to put code like this in the wiki , in a similar manner to the tcler's wiki, but ours seems a bit too polished somehow for rough code fragments 😊

Cheers
Matthew

Collapse
Posted by Iuri Sampaio on
HI Matthew,

As i read "import / export routines that use a table__new() function to insert"
I couldn't figure out if they are handful to me. Although i believe the logic and the process you ran into, it must be very similar:

I have only few tables that change very oftenly, so I don't need to dump the whole database every day. I guess it's actually an advanced topic about dump databases and i'm dispose to learn about it.

Plus, i've installed some packages which i'd like to get rid of from my datamodel. So, I would just import the wanted tables to a new service without the unwanted pkg
I'm pretty sure it's not gonna work because of the dependancies, but who knows? Any magician around here??

Collapse
Posted by Dave Bauer on
Put your code here https://openacs.org/xowiki/cookbook
Add a new page and link to it on the cookbook page, or add it to the cookbook category.