XF 2.2 Schema Documentation?

chris p

Member
Hello. We recently purchased XF 2.2 to migrate from our existing forums. I have a seemingly functional phpbb2 import working. Our phpbb2 installation was heavily customized in 2007 and could not migrate to phpbb3 so I couldn't import it in the native manner. Instead, I wrote a php importer and a new scheme_class to do the job. Is there documentation on each schema data field I could reference to make certain I've not made grave errors that will haunt later? The XF forum with all the imported users, threads and posts seems to work perfectly, but I'm quite uncomfortable that I could not have it right from reverse engineering. I'd like to double check everything against docs before going live. What I was hoping to find is a list of all tables and columns with a definitions for the columns beyond the few that are documented in the tables themselves.

If there is no documentation such as this, the one column I'm certain I have wrong and need to correct, is secret_key in the xf_user table. Would anyone be able to tell me what the source of this element should be. It had no bearing on the password that I could see as I have authentication for password and conversion working seemingly fine with a new temporary conversion scheme_class. For now I've set it to a 32 character md5 hash as a placeholder but this is of course totally wrong.

Thank you for any light you can shed on this.
 
There isn't extensive schema documentation. In general, we'd recommend writing an importer that uses our importer system, which takes care of a lot of the fine details. Barring that, hopefully much of the schema is self-explanatory. In this particular case, the secret key should be a random 32-character string. Assuming you're using a relatively modern version of PHP, it's generated roughly as follows:

PHP:
substr(
    sodium_bin2base64(
        random_bytes(32), 
        SODIUM_BASE64_VARIANT_URLSAFE_NO_PADDING
    ), 
    0, 
    32
);
 
There isn't extensive schema documentation. In general, we'd recommend writing an importer that uses our importer system, which takes care of a lot of the fine details. Barring that, hopefully much of the schema is self-explanatory. In this particular case, the secret key should be a random 32-character string. Assuming you're using a relatively modern version of PHP, it's generated roughly as follows:

PHP:
substr(
    sodium_bin2base64(
        random_bytes(32),
        SODIUM_BASE64_VARIANT_URLSAFE_NO_PADDING
    ),
    0,
    32
);
We wanted nothing from the old phpbb2 other than users, posts, and threads and these are disabled for replies so the import was much simpler than what people normally need. I couldn't figure out the importer system fast enough to meet the schedule as I also have to do an addon that is probably going to take me all the allotted time I have to figure it out, but the database is mostly very well organized as to be understandable. This one field was my only obvious problem and I really appreciate the response. Yes, absolutely current on php since it's a fresh ubuntu, so this should work.

Thank you very much.
 
Top Bottom