Table questions

Earl L
Mega Guru

I have a few questions about how customizing tables works on the SN platform. And first I want to apologize if these questions are answered in the sysadmin training but I haven't been able to attend that just yet. I also haven't seen a clear answer in the documentation, so if someone wants to point me there I'm more that happy to be directed to the right document.

First, the premise I'm working from is that some existing tables don't fully satisfy our business requirements, meaning that I want to add new columns to the tables. Let's use the cmn_building table as an example. Let's say I want a column to hold some code for each building. Based on the documentation that I've read I have a few choices, and again please feel free to correct me if I'm wrong.

1) Add a column to the existing table
2) Create a custom table that extends the existing table
3) Create a custom table that does not extend the existing table

What I'm really interested in are the pros/cons of each of these approaches. I'm making some assumptions from here on out so this is where I can really use the help.

My assumptions:

With option 1 I have changed the definition of the base table, and as I understand it this will get overwritten when we do an upgrade. Is that correct? The upside of option 1 appears to be that I've got all my existing data with no additional work required, anything that used the cmn_building table will have the new column available and I don't have to change any table references anywhere that table is used. But I'm kind of hosing myself for future upgrades.

Option 2 would seem to protect us during upgrades but the data from the extended table isn't directly populated into the new custom table so I'd need to do that myself. And in addition, I would have to point any existing references to the old cmn_building table to the new custom table.

Option 3 seems to be essentially the same as option 2 with the exception that I would need to create the entire table structure on my own, so I don't get the benefit of jumpstarting the table definition.

Am I correct in my assumptions? Either way, whether I'm correct or not, what do others do when they find themselves in this situation? Thanks for any feedback that you can offer. And again, if there is some documentation about this that you can point me to I'm more than happy to do some reading. Thanks!

Earl

5 REPLIES 5

Upgrades only affect things that are being changed. If you are going from Calgary to Dublin and nothing new is going on with the fields in Incident, then nothing in Incident (in terms of fields) would be overwritten. I have not seen any issues with table columns being affected due to upgrades.

I've seen upgrades affect scripts, forms, SSO, and complicated things of that nature but nothing with fields being lost.

If you change a label on a field and that field changes, I'm pretty sure your label will stick. I might be wrong on that though.