Extra columns in discussion table like ForeignID and RegardingID
Hi,
I'm implementing a LTI SSO plugin and I needed to create a Discussion programatically. I have done it successfully but, In order to detect the discussion when it has changed the name in the source plarform I need to store the source platform discussionId in the discussion table. The problem is that the discussionId in this table is autoincremental and, then, I cannot use this column for that. I have noticed that there are two columns that always contain null values and, by debugging I have seen they are not used. They are ForeignID and RegardingID. I have used the first one for my problem and is perfect but I'm afraid this column is used for a specific case. I have searched for information about this two columns but I haven't found anything. Can someone tell what is the purpose of this colums. Are they to use for cases like this or better not to use them because they are for another thing?
Thank you in advance.
Answers
It's used in the embed plugin in the embedvanilla plugin at the very least. I really would love to know what they mean in plain english. maybe Todd or someone will enlighten us.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
You can create a Structure method in a plugin then call structure in the Setup method.
grep is your friend.
Thank you very mutch. It did the trick perfectly!!!
x00's solution is a great one. Just an FYI though: We are standardizing on
ForeignID
being used exactly for imports and discussions that are created through plugins and api type calls.