# 从 InvisionBoard v4.3 迁移到 Discourse v2.1 时的数据库模式问题

**URL:** <https://meta.discourse.org/t/database-schema-issues-when-migration-invisionboard-v4-3-to-discourse-v2-1/95019>\
**Category:** Self-hosting\
**Created:** [2018年八月17日 18:16 UTC](https://meta.discourse.org/t/database-schema-issues-when-migration-invisionboard-v4-3-to-discourse-v2-1/95019 "2018-08-17T18:16:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![oncletom](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/oncletom/32/109064_2.png) [@oncletom](https://meta.discourse.org/u/oncletom)\
**Post date:** [2018年八月17日 18:16 UTC](https://meta.discourse.org/t/database-schema-issues-when-migration-invisionboard-v4-3-to-discourse-v2-1/95019/1 "2018-08-17T18:16:21Z")

</div>

Hello,

Thank you @pfaffman for the work on the InvisionBoard converter.  
I’ve been able to set it up, to connect to my remote database but I have a few questions after browsing the code and facing script errors.

- What version of IPBoard `OLD_FORMAT` is meant for? I don’t have an `ipb_forums_posts` (old format) and I don’t have an `ipb_attachment` either (with v4.3)
- What is `USERDIR` for?
- Does `AVATARS_DIR` implies avatars to be stored locally somewhere, and they are being copied to Discourse from the filesystem, not via HTTP?
- What are the implications of having `ID_FIRST` being set to `true`? I’m new to Discourse and I don’t yet grasp the meaning of `permalink_normalizations` being set or not
- If an install fails, can I re-run it without duplicating previously imported data? (in case I hack and rerun the importer multiple times)

Thanks for your help,  
I’d be happy to submit a pull request if I manage to bring the import somewhere

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [2018年八月17日 18:25 UTC](https://meta.discourse.org/t/database-schema-issues-when-migration-invisionboard-v4-3-to-discourse-v2-1/95019/2 "2018-08-17T18:25:19Z")

</div>

> [@oncletom](#):
>
> What version of IPBoard `OLD_FORMAT` is meant for? I don’t have an `ipb_forums_posts` (old format) and I don’t have an `ipb_attachment` either (with v4.3)

Sorry, but I don’t really know. I had one import that had wildly different data than another one that I did.

> [@oncletom](#):
>
> - What is `USERDIR` for?

It gets used to create permalinks for links to user profiles.

> [@oncletom](#):
>
> Does `AVATARS_DIR` implies avatars to be stored locally somewhere, and they are being copied to Discourse from the filesystem, not via HTTP?

I got an archive of the avatar files. The script imports them into Discourse.

> [@oncletom](#):
>
> What are the implications of having `ID_FIRST` being set to `true` ?

Something about the format of URLs on IPB to create permalinks in Discourse. Only `false` does anything.

> [@oncletom](#):
>
> If an install fails, can I re-run it without duplicating previously imported data?

Yes. When data are imported, a `user_custom_field` (or `post_custom_field`) entry is created that keeps it from getting imported again. You can also use `IMPORT_AFTER` to skip data if you know how far a previous run got.

I hope this helps. If you’ve got a budget, feel free to contact me at the email address in my profile. I’d be happy to get this cleaned up a bit more.
