From 286871d62c9ca53690e81df86e1dbfc3c43dfe32 Mon Sep 17 00:00:00 2001
From: Dries Buytaert Before doing anything backup your database. This process will change your database and its values, and some things might get lost. Don't run this script twice as it will cause some serious problems!Drupal update
";
+ print "Drupal database update
";
print "» home
\n";
print "» administer
\n";
if ($edit["start"] == -1) {
@@ -731,6 +731,9 @@ function update_page() {
print "\n";
print "";
break;
+ case "upgrade4":
+ variable_set("update_start", "2002-05-15");
+ // fall through:
default:
$start = variable_get("update_start", 0);
$dates[] = "All";
@@ -747,7 +750,7 @@ function update_page() {
$form .= form_select("Perform updates since", "start", (isset($selected) ? $selected : -1), $dates);
$form .= form_select("Stop on errors", "bail", 0, array("Disabled", "Enabled"), "Don't forget to backup your database before performing an update.");
$form .= form_submit("Update");
- print "Drupal update
";
+ print "Drupal database update
";
print form($form);
print "";
break;
@@ -755,47 +758,44 @@ function update_page() {
}
function update_info() {
- print "Drupal update
";
- print "Instructions
\n";
+
+ print "Drupal database update
";
print "\n";
- print "
\n";
+ print "
» Upgrade 3.0.x to 4.0.0 (Warning: clicking this link will update your database without confirmation.)
\n"; + print "If you are upgrading from Drupal 3.0.x, you'll want to run these queries manually before doing anything else:
\n"; print "\n"; - print "ALTER TABLE watchdog CHANGE user uid int(10) DEFAULT '0' NOT NULL;\n"; - print "ALTER TABLE watchdog CHANGE id wid int(5) DEFAULT '0' NOT NULL auto_increment;\n"; - print "ALTER TABLE users ADD sid varchar(32) DEFAULT '' NOT NULL;\n"; - print "ALTER TABLE users ADD session TEXT;\n"; - print "ALTER TABLE users CHANGE last_host hostname varchar(128) DEFAULT '' NOT NULL;\n"; - print "ALTER TABLE users CHANGE last_access timestamp int(11) DEFAULT '0' NOT NULL;\n"; - print "CREATE TABLE system (filename varchar(255) NOT NULL default '', name varchar(255) NOT NULL default '', type varchar(255) NOT NULL default '', description varchar(255) NOT NULL default '', status int(2) NOT NULL default '0', PRIMARY KEY (filename));\n"; - print "CREATE TABLE permission (rid INT UNSIGNED NOT NULL, perm TEXT, tid INT UNSIGNED NOT NULL, KEY (rid));\n"; - print "INSERT INTO permission (rid, perm) SELECT rid, perm FROM role;\n"; - print "ALTER TABLE users ADD rid INT UNSIGNED NOT NULL;\n"; - print "
You might have to by-pass the access check near the bottom of the file called update.php such that you can gain access to the updates: search for user_access().
";
- print "Choose one of the links below to either upgrade from Drupal 3.x or update from a CVS checkout.
";
- print "» upgrading will by default enable the standard Drupal themes and modules as well as setting some default values.
";
- print "» updating will require modules and themes enabled manually under Administer | Site configuration | modules.
";
- print "
Once you are done remove or disable access to update.php so nobody else can tamper with the database.
\n"; - print "Go through the various administration pages to change the existing and new settings to your liking.
Thanks for using Drupal!
update.php
to by-pass this access check; search for \$user->uid == 1
near the bottom of the file.";
}
}
else {
--
cgit v1.2.3