- <?php
- * @file
- * Install, update and uninstall functions for the text module.
- */
-
- * Implements hook_field_schema().
- */
- function text_field_schema($field) {
- switch ($field['type']) {
- case 'text':
- $columns = array(
- 'value' => array(
- 'type' => 'varchar',
- 'length' => $field['settings']['max_length'],
- 'not null' => FALSE,
- ),
- );
- break;
-
- case 'text_long':
- $columns = array(
- 'value' => array(
- 'type' => 'text',
- 'size' => 'big',
- 'not null' => FALSE,
- ),
- );
- break;
-
- case 'text_with_summary':
- $columns = array(
- 'value' => array(
- 'type' => 'text',
- 'size' => 'big',
- 'not null' => FALSE,
- ),
- 'summary' => array(
- 'type' => 'text',
- 'size' => 'big',
- 'not null' => FALSE,
- ),
- );
- break;
- }
- $columns += array(
- 'format' => array(
- 'type' => 'varchar',
- 'length' => 255,
- 'not null' => FALSE,
- ),
- );
- return array(
- 'columns' => $columns,
- 'indexes' => array(
- 'format' => array('format'),
- ),
- );
- }
-
- * @defgroup updates-7.x-to-1.x Updates from 7.x to 1.x
- * @{
- * Update functions from Drupal 7.x to Backdrop CMS 1.x.
- */
-
- * Delete teaser_length variable.
- */
- function text_update_1000() {
- update_variable_del('teaser_length');
- }
-
- * @} End of "defgroup updates-7.x-to-1.x"
- * The next series of updates should start at 2000.
- */