Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal-3495006
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
drupal-3495006
Commits
a5bbf6ca
Commit
a5bbf6ca
authored
18 years ago
by
Dries Buytaert
Browse files
Options
Downloads
Patches
Plain Diff
- Patch
#53468
by jvandyk: documentation improvements.
parent
c54de861
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
update.php
+36
-36
36 additions, 36 deletions
update.php
with
36 additions
and
36 deletions
update.php
+
36
−
36
View file @
a5bbf6ca
...
...
@@ -5,13 +5,13 @@
* @file
* Administrative page for handling updates from one Drupal version to another.
*
* Point your browser to "http://www.
sit
e.com/update.php" and follow the
* Point your browser to "http://www.
exampl
e.com/update.php" and follow the
* instructions.
*
* If you are not logged in as administrator, you will need to modify the access
* check statement below. Change the TRUE
in
to a FALSE to disable the access
* check statement below. Change the TRUE to a FALSE to disable the access
* check. After finishing the upgrade, be sure to open this file and change the
* FALSE back
in
to a TRUE!
* FALSE back to a TRUE!
*/
// Enforce access checking?
...
...
@@ -24,29 +24,29 @@ function update_sql($sql) {
}
/**
* Add
s
a column to a database
. Uses
syntax appropriate for PostgreSQL.
* Save
s
result of SQL commands in $ret array.
* Add a column to a database
using
syntax appropriate for PostgreSQL.
* Save result of SQL commands in $ret array.
*
* Note: when you add a column with NOT NULL and you are not sure if there are
* rows in table
already
, you MUST also add DEFAULT. Otherwise PostgreSQL won't
* work
if
the table is not empty. If NOT NULL and DEFAULT
is
set the
*
already
rows in t
he t
able, you MUST also add DEFAULT. Otherwise PostgreSQL won't
* work
when
the table is not empty. If NOT NULL and DEFAULT
are
set the
* PostgreSQL version will set values of the added column in old rows to the
* DEFAULT value.
*
* @param $ret
* Array to which results will be added.
*
Array to which results will be added.
* @param $table
* Name of the table, without {}
*
Name of the table, without {}
* @param $column
* Name of the column
*
Name of the column
* @param $type
* Type of column
*
Type of column
* @param $attributes
* Additional optional attributes. Recognized atributes:
*
-
not null
=> TRUE
/
FALSE
*
-
default
=> NULL
/
FALSE
/
value (with or without '', it won
t
' be added)
*
Additional optional attributes. Recognized at
t
ributes:
* not null => TRUE
|
FALSE
* default => NULL
|
FALSE
|
value (with or without '', it won'
t
be added)
* @return
* nothing, but modifies $ret parametr.
*
nothing, but modifies $ret paramet
e
r.
*/
function
db_add_column
(
&
$ret
,
$table
,
$column
,
$type
,
$attributes
=
array
())
{
if
(
array_key_exists
(
'not null'
,
$attributes
)
and
$attributes
[
'not null'
])
{
...
...
@@ -75,30 +75,30 @@ function db_add_column(&$ret, $table, $column, $type, $attributes = array()) {
}
/**
* Change
s
a column definition
. Uses
syntax appropriate for PostgreSQL.
* Save
s
result of SQL commands in $ret array.
* Change a column definition
using
syntax appropriate for PostgreSQL.
* Save result of SQL commands in $ret array.
*
*
Please r
emember
,
that changing column definition involves adding new column
* and dropping old one. This means that any ind
ex
es, primary keys and
* sequences from
the
serial-type columns are dropped and might need to be
*
R
emember that changing
a
column definition involves adding
a
new column
* and dropping
an
old one. This means that any ind
ic
es, primary keys and
* sequences from serial-type columns are dropped and might need to be
* recreated.
*
* @param $ret
* Array to which results will be added.
*
Array to which results will be added.
* @param $table
* Name of the table, without {}
*
Name of the table, without {}
* @param $column
* Name of the column to change
*
Name of the column to change
* @param $column_new
* New name for the column (set to the same as $column if you don't want to change the name)
*
New name for the column (set to the same as $column if you don't want to change the name)
* @param $type
* Type of column
*
Type of column
* @param $attributes
* Additional optional attributes. Recognized atributes:
*
-
not null
=> TRUE
/
FALSE
*
-
default
=> NULL
/
FALSE
/
value (with or without '', it won't be added)
*
Additional optional attributes. Recognized at
t
ributes:
* not null => TRUE
|
FALSE
* default => NULL
|
FALSE
|
value (with or without '', it won't be added)
* @return
* nothing, but modifies $ret parametr.
*
nothing, but modifies $ret paramet
e
r.
*/
function
db_change_column
(
&
$ret
,
$table
,
$column
,
$column_new
,
$type
,
$attributes
=
array
())
{
if
(
array_key_exists
(
'not null'
,
$attributes
)
and
$attributes
[
'not null'
])
{
...
...
@@ -127,7 +127,7 @@ function db_change_column(&$ret, $table, $column, $column_new, $type, $attribute
}
/**
* If the schema version for Drupal core is stored in the
the
variables table
* If the schema version for Drupal core is stored in the variables table
* (4.6.x and earlier) move it to the schema_version column of the system
* table.
*
...
...
@@ -230,7 +230,7 @@ function update_fix_sessions() {
* System update 115 changes the watchdog table, which breaks the update
* script's ability to use logging. This changes the table appropriately.
*
* This code, including the 'update_watchdog_115_fixed' variable,
may be removed
* This code, including the 'update_watchdog_115_fixed' variable, may be removed
* when update 115 is removed. It is part of the Drupal 4.5 to 4.7 migration.
*/
function
update_fix_watchdog_115
()
{
...
...
@@ -253,7 +253,7 @@ function update_fix_watchdog_115() {
* System update 142 changes the watchdog table, which breaks the update
* script's ability to use logging. This changes the table appropriately.
*
* This code, including the 'update_watchdog_fixed' variable,
may be removed
* This code, including the 'update_watchdog_fixed' variable, may be removed
* when update 142 is removed. It is part of the Drupal 4.6 to 4.7 migration.
*/
function
update_fix_watchdog
()
{
...
...
@@ -283,7 +283,7 @@ function update_fix_watchdog() {
* The update number to run.
*
* @return
* TRUE if the update was finished. Otherwise,
false
.
* TRUE if the update was finished. Otherwise,
FALSE
.
*/
function
update_data
(
$module
,
$number
)
{
$ret
=
module_invoke
(
$module
,
'update_'
.
$number
);
...
...
@@ -452,7 +452,7 @@ function update_progress_page_nojs() {
$new_op
=
'finished'
;
}
// Updates succesful
,
remove fallback
// Updates succesful
;
remove fallback
ob_end_clean
();
}
else
{
...
...
@@ -636,7 +636,7 @@ function update_convert_table_utf8($table) {
return
$ret
;
}
// Some unavoidable errors happen because the database is not yet up
to
date.
// Some unavoidable errors happen because the database is not yet up
-
to
-
date.
// We suppress them to avoid confusion. All errors are still logged.
ini_set
(
'display_errors'
,
FALSE
);
...
...
@@ -692,4 +692,4 @@ function update_convert_table_utf8($table) {
if
(
isset
(
$output
))
{
print
theme
(
'maintenance_page'
,
$output
);
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment