Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Adding index and Not Null to existing table causing problems.

Marina Ferraz McCashin February 2, 2021

We are currently going through the Atlassian Data Center app readiness checklist and are a little confused by what is required for Questions 89, 90, and 91 - Database: Additional Tables

We found that we did require indexes on our additional tables, which works fine. However, when we add a NOT NULL constraint to the indexed fields, on updating the app in the host application the existing tables are dropped, recreated and all data is gone. Obviously, this is not suitable for our existing customers. 

This does not happen if we only add the Index and no further constraint. 

So this leads me to ask, is the NOT NULL constraint for an indexed column absolutely necessary?

Question 89 is:

Does your app have indexes defined on the fields that are used in frequent queries? *
I now can answer Yes to this. 

Now, reading question 90 of the checklist:

 Does your app have non­null constraints and unique constraints to guarantee? *

I read this to be asking, does your app have nonnull constraints and unique constraints to guarantee the index of the previous question. 

Is this how others are reading it? This is what led me to believe the NOT NULL constraint goes hand in hand with the index. 

Any advice or previous experience would be greatly appreciated. 

Marina
 

1 answer

Suggest an answer

Log in or Sign up to answer
0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 2, 2021

For a bit more context (I've got three ways I could be reading the question), could you tell us what "DC Checklist" you are using?  Typing some of the phrases you have used into google does not land me on any documentation, so I'm a bit lost on what you're reading.

Marina Ferraz McCashin February 2, 2021

Hi Nic

I'm referring to the Atlassian Data Center app readiness checklist.

It was originally a google form. 

 

Marina.

Like Nic Brough -Adaptavist- likes this
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 2, 2021

Thanks, that's cleared up what I suspected - it's not something I have run into myself (I've not written DC apps).  But it saves us suffering the other essay-like answers that don't apply!

TAGS
AUG Leaders

Atlassian Community Events