Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Extra columns in discussion table like ForeignID and RegardingID

naquadaqnaquadaq New
edited April 2012 in Vanilla 2.0 - 2.8


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.


  • Options
    peregrineperegrine MVP
    edited April 2012

    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.

  • Options
    x00x00 MVP
    edited April 2012

    You can create a Structure method in a plugin then call structure in the Setup method.

    grep is your friend.

  • Options

    Thank you very mutch. It did the trick perfectly!!!

  • Options
    ToddTodd Chief Product Officer Vanilla Staff

    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.

Sign In or Register to comment.