The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Database Migration
#1
Although I will be changing the database schema, I am also in the process of writing a new install tool that will offer the ability to migrate your database to the new schema. Oh, and you won't have to edit PHP files anymore before starting the install. It just walks you through that process and writes your init file for you.
  Reply
#2
The Userspice 3 to 4 tool is available at http://www.userspice.org/updates
  Reply
#3
I just ran the migration on a clean install of US3, and upgraded to US4, so the process itself works, granted this is a highly idealized example. There are a few things that could likely be improved, but a big upgrade is always best to play on the safe side and force some things to remain manual.
  Reply
#4
I did one today too - the DB upgraded perfectly.

The change in file structure would mostly break the example I upgraded so I ended up backing out of it.

3.x is so inviting, people will have made edits to the core that might make the upgrade rather hazardous.
  Reply
#5
//If you got a notification from a different username, I had to kill off a couple of accounts that were trying to attack the site. We got a mini DOS attack today. Everything seems fine now.

The great thing is that there’s nothing wrong at all with UserSpice 3. If people want to do things procedurally, it’s a great choice. On top of that, if they get one of the later versions with the nice dashboard and the new classes, they can even do their own oop queries. I need to do a better job of documenting the upgrade process.

The general rule of thumb is…
1. All the “userspice” pages are new so you would lose any changes if you modified yours.
2. Anything you wrote on your frontend will work fine with a few caveats.
a. If you’re making calls using the old built in functions that look for the logged in user. It will need to be updated. Basically
if(isUserLoggedIn()) {
becomes
if($user->isLoggedIn()) {

b. If you are using US3 procedural ways to echo out things like the user name, you have to use the new OOP way of doing that. by default it’s
<?=$user->data()->username?> or whatever you want to echo out.

3. I meticulously rewrote every single function that US3 actually used into OOP/PDO PHP. So the biggest thing you’ll get is that if you were (and you probably weren’t) using US3’s built in functions, you might receive an object back instead of an array and might need to update a bit. For the most part, though, people seemed to build their own db classes and things like that and US4 will play nicely with those. Especially if you’re willing to call your db variable anything other than $db.
  Reply
#6
This is a problem with any major upgrade of any software (well, except for Windows 10...I wish it WASN'T free so they would stop bugging me). I'm glad I was able to start a clean slate with US4. For the most part, I don't touch any US files so that definitely makes things easier. For the most part, I'm also doing my own database queries since I need to for my own application anyway and all in all, they play very nicely together.
  Reply
#7
The GWX Control Panel (Get Windows 10) is a fantastic tool to stop MS from bugging you about downloading windows 10.

http://ultimateoutsider.com/downloads/

And yeah, as far as these classes go, they've been around (mostly) for 5 or so years, so they're pretty well tested...which means you can build pretty much whatever you want with them and you don't have to worry about system upgrades breaking the stuff you're doing to your own project.

If anything the tweaks I've made to them add more flexibility, not less.
  Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)