upgrade query

Started by Sumaleth, January 29, 2005, 05:50:06 AM

Previous topic - Next topic

Sumaleth

Is there a way to upgrade from 1.0 to 1.0.1 without the upgrade.php script?

I'm working on an SMF upgrader for the Installatron auto-installer (hxxp:www.installatron.com [nonactive]) and I have to use the full archive to do the upgrade but I've noticed that the full archive doesn't include the upgrade.php script.

Is 1.0->1.0.1 just a change in files? Or are there some database/config type changes as well? I started looking through upgrade.php to determine what edits I might need to reproduce, but its 4000 lines so that's no easy task. ;)

Are there a few simple file-edits/database-edits that I can do, along with copying all the new files over the old ones (except the settings.php file) and produce a successful upgrade?

Thanks,
Rowan.

Jerry

You should be able to upgrade 1.0 -> 1.0.1 with your package manager :)


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

"If all you look for is the negative in things, you will never see the positive."

Sumaleth

I'm afraid that won't work. An auto-installer (like Installatron) is a separate program that does the installing/upgrading of the script at the click of a button - there's no interface or anything like that and it doesn't look like it would be possible to call that package manager function silently.

To give you an example, here's the code we made to upgrade from rc1 to rc2:

      $f->rm(array('upgrtmp/Settings.php','upgrtmp/Settings_bak.php','upgrtmp/install.php'));
      $f->mv('upgrtmp');
      $DB = new DB_mysql($iTron->stub->install->db_name,$iTron->stub->install->db_uname,$iTron->stub->install->db_passwd);
      $DB->query("ALTER TABLE smf_boards DROP COLUMN notifyAnnouncements");
      $DB->query("ALTER TABLE smf_instant_messages CHANGE COLUMN ID_PM ID_PM int(10) unsigned NOT NULL auto_increment");
      $DB->query("ALTER TABLE smf_themes CHANGE COLUMN value value text NOT NULL");


And for rc2 to 1.0:

      $f->rm(array('upgrtmp/Settings.php','upgrtmp/Settings_bak.php','upgrtmp/install.php'));
      $f->mv('upgrtmp');


That second one didn't have any database mods so it was a simple task of copying the new files on top of the install, except for settings.php etc. The first one required a few database mods.

The upgrade.php script is so large now that it's very difficult to work out what the steps would be for just 1.0 to 1.0.1.

I think I might try to download the upgrade.php script separately and then call it using upgrade.php?step=1&backup=0 etc to make it run silently. That might work.

Rowan.

[Unknown]

Well, it uses javascript so that might not work.  I would suggest taking the upgrade.php from 1.0 and the upgrade.php from 1.0.1 and diffing them.  That said, I don't think there were ANY changes.

-[Unknown]

Advertisement: