Users running a non-download version of Vanilla (pulled from github), on branch release/2019.016 or master from the last 2 weeks should upgrade to release/2019.017 or latest master for security reasons. Downloaded official open sources releases are not affected.

How to inject discussions from SQL?

Hi, I have a database from a previous forum which was a custom script. I want to migrate to Vanilla, and I tried to insert discussions, users and posts into a Vanilla test forum that I have, but they are not showing up. It seems that what I uploaded matches data types and everything.


I'm using gdn_comment, gdn_discussion and gdn_user tables.


Is there any doc that I can use as reference, or can someone explain what I need to do? thanks.

Comments

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    On windows table names are oftentimes in lower case. If you use a Linux system, it would be

    GDN_Comment

    GDN_Discussion

    GDN_User


    Discussions musthave a category from GDN_Category (not -1)

    Users must have a role from GDN_Role in GDN_UserRole


  • Do IDs have to be inmediately incremental from the ones already in the DB? For example, my lower user ID is 1000, not 1, would that cause any trouble? Same with comments etc.

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    I think there is a way to "tell" mysql from which index number to start. I would increase that to the first free number higher than all the existing numbers


  • pitkmipitkmi scifi-meshes.com New


    Do IDs have to be inmediately incremental from the ones already in the DB? For example, my lower user ID is 1000, not 1, would that cause any trouble? Same with comments etc.

    I don't think that's an issue. I spun a couple of different databases (separate gallery and a downloads section from an old forum) into the main forum and I just added ten million (10000000) to all the DiscussionIDs to keep them from overlapping with the actual forum content. CommentIDs for the gallery and downloads (they had their own comments) got bumped up by two million (2000000). I was probably going for twenty million actually, but looks like I missed a zero there... anyway... also moved the system users (System, Stopforumspam, a bot account for feeds) to 9999999 and onwards, since they would have overlapped with imported userIDs.

    Any new discussions and users have IDs in the ten million range, while comments get IDs in the two million range. As an added bonus, it's really easy to tell old and new forum content apart in the database. Don't think I had to anything special to get it working. Vanilla just figured out the biggest ID, and started incrementing from there.

    donshakespeare
  • @pitkmi you scare me with this imagery

    example.com/discussion/1928929953999694/how-to-bring-back-my-credit

    R_J
  • R_JR_J Cheerleader & Troubleshooter Munich Moderator
  • Ah. the Count! His elevator counts where the most heart breaking. Speaking of digital addiction.

Sign In or Register to comment.