nextgenhealthcare / connect

The swiss army knife of healthcare integration.
Other
944 stars 280 forks source link

Custom Medatadata - DB column not created on channel deployment with Oracle 19c DB (OCI) #5902

Open roggss opened 1 year ago

roggss commented 1 year ago

Deploying a channel with Oracle 19c will not create the custom metadata column on the database side. And if meta data was created manually on the DB side the column will still be deleted when channel got depolyed.

To Reproduce

  1. Use Oracle19c database
  2. Create a channel with custom metadata
  3. Deploy the channel,

Expected behavior Custom metada should be added to D_MCMxxx table

Actual behavior D_MCM will only contains with two metada columns as below metadata_id message_id

Screenshots Mirth image

DB structure image

Environment (please complete the following information):

Workaround(s) No workaround I can think, Please hellp

pladesma commented 1 year ago

Do you know if you can reproduce this in more recent versions of Mirth Connect? I tested in MC 4.4.0, and I'm not seeing the issue.

roggss commented 1 year ago

I tested it and does not exist in MC 4.4.0. The initialization of tables however, is not happening so I have to run the SQL statements manually plus the creation of D_CHANNELS (which is not on SQL file dbconf). refer to my post below about DB initialization issue that both exist in 3.9 and 4.4 for Oracle 19C database. https://github.com/nextgenhealthcare/connect/discussions/5886

Back to 3.9, is there a work around on this?

Thanks

PS: Oracle 19c (In Oracle Cloud Infrastructure or OCI Environment)

roggss commented 1 year ago

Furthermore, the custom metadata columns are not deleted if the channel was created under the new instance/db.

The metadata columns are only removed if the channel was migrated (coming from restore config). And also, I noticed that if the metadata name changed, the channel will not be deplyed.., it just in keep in "deploying" status/

Looks like this issue is only for migrated channels. New created channels dont have this issue.

Please help

pladesma commented 1 year ago

Sorry, I don't have a good workaround at the moment. We'll need to do some research and get back to you.

roggss commented 1 year ago

Apparently, all the issues gone away after I changed my schema/user from any of these "mirth", " mirth1", "mirth2", "mirth3" to "MIRTHDB". Im not sure if the caps lock matter or its the schema name itself. I will definitely do a test if the uppercase matter. more to come :)