Hi! I’m working on importing a reasonably large Vanilla Forum into Discourse (self-hosted) and I noticed that some information was getting lost when using
script/import/vanilla_mysql.rb. I added them to my own import script, and would like to push those changes upstream.
Here’s what I changed:
- https://github.com/discourse/discourse/commit/fd12f6ece402459fccc6cb80247ce0722d19882a squish emails (the forum I’m working on has some emails with spaces and users are imported as having invalid emails)
- https://github.com/discourse/discourse/commit/ac9c00745d73e2f20f67b1d6b1dcc5f0b315a807 import banned users as suspended for a thousand years (since Vanilla forums don’t have an end date)
- https://github.com/discourse/discourse/commit/2e967eb820f4cd39d2e7354cf5cd6ef7c91f38fb import users who have posts as TL2, so they can continue using the forum normally
https://github.com/discourse/discourse/commit/6ff032ab0a0ee5826b32a770c84ec9cc8510c3a7 import topic info:
- pinned in their category
- pinned globally
- with original view count
- https://github.com/discourse/discourse/commit/29657b5f9b4825cb562413c8db1a0bb86f2273c0 import private messages
- https://github.com/discourse/discourse/commit/4b513d79e569c2d3ffa6ecde4c2eedb6c384a999 encode Vanilla forum usernames when creating permalinks to profiles (I found several users with spaces and special characters and those links were broken)
https://github.com/discourse/discourse/commit/76ff0d423608254a61893e53966de872b14a22c5 parse Vanilla’s new
Richbody format, including embedded images and file uploads (without this, they look like their raw JSON strings)
I left these features as separate commits to make reviewing easier, but I can squash them if that’s better, please let me know.