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
0147fa3b
Commit
0147fa3b
authored
18 years ago
by
Dries Buytaert
Browse files
Options
Downloads
Patches
Plain Diff
- Patch
#69659
by derek: improved documentation of db abstraction layer.
parent
1a68f48c
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
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
update.php
+6
-4
6 additions, 4 deletions
update.php
with
6 additions
and
4 deletions
update.php
+
6
−
4
View file @
0147fa3b
...
...
@@ -28,9 +28,11 @@ function update_sql($sql) {
* 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
* already rows in the table, 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
* already rows in the table, you MUST also add DEFAULT. Otherwise PostgreSQL
* won't work when the table is not empty, and db_add_column() will fail.
* To have an empty string as the default, you must use: 'default' => "''"
* in the $attributes array. 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
...
...
@@ -44,7 +46,7 @@ function update_sql($sql) {
* @param $attributes
* Additional optional attributes. Recognized attributes:
* not null => TRUE|FALSE
* default => NULL|FALSE|value (
with or without '', it won't be added
)
* default => NULL|FALSE|value (
the value must be enclosed in '' marks
)
* @return
* nothing, but modifies $ret parameter.
*/
...
...
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