summaryrefslogtreecommitdiff
path: root/modules/simpletest/tests/database_test.install
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-03-03 08:40:25 +0000
committerDries Buytaert <dries@buytaert.net>2010-03-03 08:40:25 +0000
commitc4fd5818999670bf754c24a88fc718e6b502a85b (patch)
tree44d49eeb9a53b22a3a8b1ba698863291e850d916 /modules/simpletest/tests/database_test.install
parenta3134cc24a396c526ad6285337d3419d8d888f47 (diff)
downloadbrdo-c4fd5818999670bf754c24a88fc718e6b502a85b.tar.gz
brdo-c4fd5818999670bf754c24a88fc718e6b502a85b.tar.bz2
- Patch #353918 by Dave Reid, yched: drupal_write_record() writes empty string instead of empty serialized array.
Diffstat (limited to 'modules/simpletest/tests/database_test.install')
-rw-r--r--modules/simpletest/tests/database_test.install30
1 files changed, 29 insertions, 1 deletions
diff --git a/modules/simpletest/tests/database_test.install b/modules/simpletest/tests/database_test.install
index 4ecf74bc2..98a0c8403 100644
--- a/modules/simpletest/tests/database_test.install
+++ b/modules/simpletest/tests/database_test.install
@@ -35,7 +35,8 @@ function database_test_schema() {
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
- 'default' => 0),
+ 'default' => 0,
+ ),
'job' => array(
'description' => "The person's job",
'type' => 'varchar',
@@ -202,5 +203,32 @@ function database_test_schema() {
),
);
+ $schema['test_serialized'] = array(
+ 'description' => 'Basic test table for NULL value handling.',
+ 'fields' => array(
+ 'id' => array(
+ 'type' => 'serial',
+ 'unsigned' => TRUE,
+ 'not null' => TRUE,
+ ),
+ 'name' => array(
+ 'description' => "A person's name.",
+ 'type' => 'varchar',
+ 'length' => 255,
+ 'not null' => FALSE,
+ 'default' => '',
+ ),
+ 'info' => array(
+ 'description' => "The person's data in serialized form.",
+ 'type' => 'text',
+ 'serialize' => TRUE,
+ ),
+ ),
+ 'primary key' => array('id'),
+ 'unique keys' => array(
+ 'name' => array('name')
+ ),
+ );
+
return $schema;
}