Home
Extended ECM
API, SDK, REST and Web Services
Adding DB Schema at module installation time
Gabriel_Lopez
Hi!I need to add DB schema when installing my custom module so I've followed the step by step "Adding Database Schema" online tutorial. The thing is that when I try to assign some object's reference number to a property as I am told by the tutorial I get an "#780c160f (Unknown)" value for that property and the schema installation doesn't work. Has anybody faced this kind of problem before? If so I'd be very grateful if somebody could tell me what I am doing wrong. Thanks.
Find more posts tagged with
Comments
Finney_Bryan_(x-giantuser2_-_(deleted))
I am having the same issue
https://knowledge.opentext.com/knowledge/llisapi.dll?func=ll&objId=2549322&objAction=viewThanksBryan
FinneyGiant Eagle Inc.
Howard_Pell
Step 6 of the Readme feature says to make object references. The easiest way to do this is to open two object browser windows (use the binoculars). Position them on the screen so one is to the left and the other to the right.In the right browser window, select the new DBScripts object you created in step 4 of the readme.In the left browser window click on the MSSQL object and drag it to the features frame on the right browser window.Repeat this last step with the Oracle and Sybase objects.That should do it.Howard
Howard_Pell
You should know that these add-new-schema instructions were written before Open Text developed its Cluster Technology and so Clusters were not considered.We can imagine that installing a module that has additional schema on machine 1 of a cluster will work just fine; however, installing the same module on machine 2 of our cluster will pose a problem as the schema will already exist as it was just created when installed on machine 1.I would suggest that if a cluster is in your future you strongly consider placing the schema creation (and schema destruction - uninstall) code as part of an Administrator setup, accessible from the administration pages.Howard
Magnus_Salgo_(IDNordicAdmin_(Delete)_2300172)
My feeling is that most Livelink modules down't support this in a good way.....Are you telling us that there will be a change in those modules wouldn't it be easier to rewrite the dbinstall part in the product .... My understanding is that when you install on a LL machine and the kini record telling that dbmodell for this module is missing then we need to update the db schema...If the kini record is there and have the right version then we don't need to update...Please explain for us people out here fighting with LL modules development .....RegardsMagnus S?lg?salgo@ids.se
Howard_Pell
First let me say that I'm a trainer at Open Text and my position is to explain the way things work. I really can't comment on how things might work in the future. I'll leave that for someone in development.Perhaps I could have been clearer in my previous post. The way the module installation works today is just fine for a single machine installation and there is nothing more you need to do. The only issue is one where you are installing your module on a cluster. You are correct in stating that the record is in the KINI and so the installation should realise that your table is installed and not try to install it again. However, that is not how it works today. You could certainly do this on your own.Also, consider what you will do when you need to upgrade your module. Your table(s) already exists with data and your module may (or may not) need to modify your schema. How will you do it? Where will you do it from? (that is, will you put a button on the Administration page, etc).I hope this helps.Howard
Magnus_Salgo_(IDNordicAdmin_(Delete)_2300172)
Thanks Howard I know you since a workflow builder training in San Antonio.The problem is for us trying to work with the product is that we don't get any information from development regardingthings like this...I will send one of my people to Paris on a developers cerification but when you read what will be walked throughyou get a feeling that it is rather basic level.COuld someone point on sessions where the development people will be in Paris speaking with us Partners regarding develonment and future ?!?!?RegardsMagnus S?lg?Consult manager ID Applicationwww.idapplication.com
William__Li_(scoruser4_-_(deleted))
This may be a late reply, but what the hey.I would think it would be simple enough, in your dbsetup scripts, to only create your tables etc if the tables don't already exist. i.e. run a sql statement via capi.exec to determine whether the schema has already been updated to support your module.dynamic results = capi.exec( [connection], "select count(*) as count from user_tables where table_name='YOUR_CUSTOM_TABLE'" )If count is 0, create your tables; if count > 0, don't create your tables.There are some examples of evaluation like this done during schema creation: pull up Builder, browse by inheritance, then click DBWIZAPI, DBWizAPIRoot, ModuleDBObject, and look at the scripts other people have put into their ModuleDBObjects. I would think you could override the InitModule script, or the DoDBInstall and DoDBScripts could be fun.In the past, I've tied into the module configuration code to do things like offer the installing user some module-specific configuration options. I imagine some of this could be done there, as well, even allowing the installing user to determine at install-time whether or not to run the schema creation scripts. I can always send along code to that effect if it would be helpful.