summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/field/modules/text/text.install21
-rw-r--r--modules/taxonomy/taxonomy.install18
2 files changed, 33 insertions, 6 deletions
diff --git a/modules/field/modules/text/text.install b/modules/field/modules/text/text.install
index 3854e5688..cd1d9ded5 100644
--- a/modules/field/modules/text/text.install
+++ b/modules/field/modules/text/text.install
@@ -89,12 +89,21 @@ function text_update_7000() {
'length' => 255,
'not null' => FALSE,
);
- $fields = _update_7000_field_read_fields(array('module' => 'text', 'storage_type' => 'field_sql_storage'));
+ $fields = _update_7000_field_read_fields(array(
+ 'module' => 'text',
+ 'storage_type' => 'field_sql_storage',
+ ));
foreach ($fields as $field_name => $field) {
- $table = _field_sql_storage_tablename($prior_field);
- $revision_table = _field_sql_storage_revision_tablename($prior_field);
- $field_name = _field_sql_storage_columnname($field['field_name'], 'format');
- db_change_field($table, $field_name, $field_name, $spec);
- db_change_field($revision_table, $field_name, $field_name, $spec);
+ if ($field['deleted']) {
+ $table = "field_deleted_data_{$field['id']}";
+ $revision_table = "field_deleted_revision_{$field['id']}";
+ }
+ else {
+ $table = "field_data_{$field['field_name']}";
+ $revision_table = "field_revision_{$field['field_name']}";
+ }
+ $column = $field['field_name'] . '_' . 'format';
+ db_change_field($table, $column, $column, $spec);
+ db_change_field($revision_table, $column, $column, $spec);
}
}
diff --git a/modules/taxonomy/taxonomy.install b/modules/taxonomy/taxonomy.install
index dd97edde4..8c2de3f86 100644
--- a/modules/taxonomy/taxonomy.install
+++ b/modules/taxonomy/taxonomy.install
@@ -258,6 +258,11 @@ function taxonomy_update_dependencies() {
$dependencies['node'][7006] = array(
'taxonomy' => 7002,
);
+ // Ensure that format columns are only changed after Filter module has changed
+ // the primary records.
+ $dependencies['taxonomy'][7009] = array(
+ 'filter' => 7010,
+ );
return $dependencies;
}
@@ -782,3 +787,16 @@ function taxonomy_update_7008() {
),
));
}
+
+/**
+ * Change {taxonomy_term_data}.format into varchar.
+ */
+function taxonomy_update_7009() {
+ db_change_field('taxonomy_term_data', 'format', 'format', array(
+ 'type' => 'varchar',
+ 'length' => 255,
+ 'not null' => FALSE,
+ 'description' => 'The {filter_format}.format of the description.',
+ ));
+}
+