Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
project
drupal
Commits
e21b5be8
Commit
e21b5be8
authored
19 years ago
by
Dries Buytaert
Browse files
Options
Downloads
Patches
Plain Diff
- Patch
#45747
by Cvbge: documentation improvement + added primary key that got lost
parent
b6b98bb6
No related branches found
No related tags found
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
database/updates.inc
+1
-0
1 addition, 0 deletions
database/updates.inc
update.php
+6
-1
6 additions, 1 deletion
update.php
with
7 additions
and
1 deletion
database/updates.inc
+
1
−
0
View file @
e21b5be8
...
...
@@ -1424,6 +1424,7 @@ function system_update_167() {
break
;
case
'pgsql'
:
db_change_column
(
$ret
,
'vocabulary_node_types'
,
'type'
,
'type'
,
'varchar(32)'
,
array
(
'not null'
=>
TRUE
,
'default'
=>
"''"
));
$ret
[]
=
update_sql
(
"ALTER TABLE
{
vocabulary_node_types
}
ADD PRIMARY KEY (vid, type)"
);
break
;
}
...
...
This diff is collapsed.
Click to expand it.
update.php
+
6
−
1
View file @
e21b5be8
...
...
@@ -78,6 +78,11 @@ function db_add_column(&$ret, $table, $column, $type, $attributes = array()) {
* Changes a column definition. Uses syntax appropriate for PostgreSQL.
* Saves result of SQL commands in $ret array.
*
* Please remember, that changing column definition involves adding new column
* and dropping old one. This means that any indexes, primary keys and
* sequences from the serial-type columns are dropped and might need to be
* recreated.
*
* @param $ret
* Array to which results will be added.
* @param $table
...
...
@@ -91,7 +96,7 @@ function db_add_column(&$ret, $table, $column, $type, $attributes = array()) {
* @param $attributes
* Additional optional attributes. Recognized atributes:
* - not null => TRUE/FALSE
* - default => NULL/FALSE/value (with or without '', it won
t
' be added)
* - default => NULL/FALSE/value (with or without '', it won'
t
be added)
* @return
* nothing, but modifies $ret parametr.
*/
...
...
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