TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

December 03, 2024, 02:58:03 AM

Login with username, password and session length
Members
Stats
  • Total Posts: 195,443
  • Total Topics: 21,252
  • Online today: 85
  • Online ever: 6,457 (November 30, 2024, 02:40:09 PM)
Users Online
  • Users: 0
  • Guests: 78
  • Total: 78

Combining TP database tables with SMF database tables

Started by davo88, March 31, 2024, 10:42:18 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

davo88

I am planning the changeover process from an SMF 2.0.19 site to an SMF 2.1.4/TP 3.0.0 site on a different server.
As there is a lot of TP configuration and entering of article/block data to do on the new site, I have been considering and testing whether the TP installation data can be pre-configured so it doesn't all have to be done on changeover day.

There seems to be two ways of doing this.

1. Prebuild the final destination site fully including all TP data. Then leave the TP database tables in place and just replace the SMF database tables.
2. Prebuild a separate site fully including all TP data. Then export the TP tables and import them to the final site's database.

Thinking through each of those scenarios, these are the steps I imagine would be required.

Option 1
Prebuild the final site fully using older SMF data and all the new TP data
On conversion day
- Drop only the SMF tables in the final destination site
- Leave the eleven TP tables containing all the TP data in place
- On a completely separate conversion site, convert the latest SMF database to 2.1.4 format
- Import this converted SMF database to the final destination site
- Install the TP mod package to the final site.
- TP then reads the eleven existing TP tables.


Option 2
Prebuild a separate site fully using older SMF data and all the new TP data
On conversion day
- Have a fresh installation of SMF 2.1.4 installed at the final destination with no data at all.
- On a completely separate conversion site, convert the latest SMF database to 2.1.4 format
- Drop the SMF tables in the final destination site
- Import the converted SMF database to the final destination site
- Install the TP mod package to the final destination site
- Export the eleven TP database tables from the prebuilt separate site
- Import the eleven TB database tables to the final destination site

I have tested Option 1 and it appears to work OK. I looked for time stamps in the TP tables that might cause a problem because the timestamps in say the article creation date fields, would be earlier than the TP installation timestamp recorded in smf_log_packages. But it is hard to tell if this could be an issue.

Option 2 is not tested yet but seems to have pretty much the same outcome.

Anyone had experience with doing this sort of thing - combining existing TP data with a new SMF installation?

@rjen

I have moved to data to other installs multiple times. There is only one dependency between SMF tables and the tp tables and those are member id's. Used in articles, shouts, downloads and comments.

As long as you keep those the same you are fine.

But even if they are not the same there's no real issue.
Moving TinyPortal tables you have to be aware of three setting in tp_setting: image path, upload path and block path: if the old install was in a different location you need to manually correct these in the table.

I would setup the forum in the easiest procedure and copy TinyPortal tables over, then install the latest version of TP in the new forum

Running Latest TP on SMF2.1 at: www.fjr-club.nl

davo88

Excellent. Hadn't thought of any of those points. Found the the three path settings in smf_tp_settings - blockcode_upload_path, download_upload_path, image_upload_path.

One question about the rebuilding order. You mention to import the TP tables, then install TP. Is there a reason for doing it in that order?

@rjen

Installing TP will automatically set the image_upload path correctly.

And it also checks and corrects table definitions and settings.
Mind you: if your tp tables are built from the latest tp version all should be okay, but it won't hurt
Running Latest TP on SMF2.1 at: www.fjr-club.nl

davo88


davo88

Have done this now a few times - attached a pre-configured TP installation to an existing SMF forum. It all works very well and it's great being able to build up a TP site, then just bolt it on to an existing SMF.