Skip to content
Snippets Groups Projects
Commit f5e8a63c authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #1097100 by quicksketch, boombatower, rfay, claar, bfroehle: remove...

- Patch #1097100 by quicksketch, boombatower, rfay, claar, bfroehle: remove all 7xxx update functions and tests (D6 to D7 upgrade path).
parent 40f9e061
No related branches found
No related tags found
No related merge requests found
...@@ -172,7 +172,7 @@ function field_schema() { ...@@ -172,7 +172,7 @@ function field_schema() {
* *
* @ingroup update-api-7.x-to-8.x * @ingroup update-api-7.x-to-8.x
*/ */
function _update_8000_field_create_field(&$field) { function _update_7000_field_create_field(&$field) {
// Merge in default values.` // Merge in default values.`
$field += array( $field += array(
'entity_types' => array(), 'entity_types' => array(),
...@@ -243,14 +243,14 @@ function _update_8000_field_create_field(&$field) { ...@@ -243,14 +243,14 @@ function _update_8000_field_create_field(&$field) {
* To protect user data, this function can only be used to delete fields once * To protect user data, this function can only be used to delete fields once
* all information it stored is gone. Delete all data from the * all information it stored is gone. Delete all data from the
* field_data_$field_name table before calling by either manually issuing * field_data_$field_name table before calling by either manually issuing
* delete queries against it or using _update_8000_field_delete_instance(). * delete queries against it or using _update_7000_field_delete_instance().
* *
* @param $field_name * @param $field_name
* The field name to delete. * The field name to delete.
* *
* @ingroup update-api-7.x-to-8.x * @ingroup update-api-7.x-to-8.x
*/ */
function _update_8000_field_delete_field($field_name) { function _update_7000_field_delete_field($field_name) {
$table_name = 'field_data_' . $field_name; $table_name = 'field_data_' . $field_name;
if (db_select($table_name)->range(0, 1)->countQuery()->execute()->fetchField()) { if (db_select($table_name)->range(0, 1)->countQuery()->execute()->fetchField()) {
$t = get_t(); $t = get_t();
...@@ -279,7 +279,7 @@ function _update_8000_field_delete_field($field_name) { ...@@ -279,7 +279,7 @@ function _update_8000_field_delete_field($field_name) {
* *
* @ingroup update-api-7.x-to-8.x * @ingroup update-api-7.x-to-8.x
*/ */
function _update_8000_field_delete_instance($field_name, $entity_type, $bundle) { function _update_7000_field_delete_instance($field_name, $entity_type, $bundle) {
// Delete field instance configuration data. // Delete field instance configuration data.
db_delete('field_config_instance') db_delete('field_config_instance')
->condition('field_name', $field_name) ->condition('field_name', $field_name)
...@@ -317,7 +317,7 @@ function _update_8000_field_delete_instance($field_name, $entity_type, $bundle) ...@@ -317,7 +317,7 @@ function _update_8000_field_delete_instance($field_name, $entity_type, $bundle)
* by the $key parameter. * by the $key parameter.
* @ingroup update-api-7.x-to-8.x * @ingroup update-api-7.x-to-8.x
*/ */
function _update_8000_field_read_fields(array $conditions = array(), $key = 'id') { function _update_7000_field_read_fields(array $conditions = array(), $key = 'id') {
$fields = array(); $fields = array();
$query = db_select('field_config', 'fc', array('fetch' => PDO::FETCH_ASSOC)) $query = db_select('field_config', 'fc', array('fetch' => PDO::FETCH_ASSOC))
->fields('fc'); ->fields('fc');
...@@ -349,7 +349,7 @@ function _update_8000_field_read_fields(array $conditions = array(), $key = 'id' ...@@ -349,7 +349,7 @@ function _update_8000_field_read_fields(array $conditions = array(), $key = 'id'
* *
* @ingroup update-api-7.x-to-8.x * @ingroup update-api-7.x-to-8.x
*/ */
function _update_8000_field_create_instance($field, &$instance) { function _update_7000_field_create_instance($field, &$instance) {
// Merge in defaults. // Merge in defaults.
$instance += array( $instance += array(
'field_id' => $field['id'], 'field_id' => $field['id'],
......
...@@ -29,7 +29,7 @@ function field_sql_storage_schema() { ...@@ -29,7 +29,7 @@ function field_sql_storage_schema() {
* *
* @ingroup update-api-7.x-to-8.x * @ingroup update-api-7.x-to-8.x
*/ */
function _update_8000_field_sql_storage_write($entity_type, $bundle, $entity_id, $revision_id, $field_name, $data) { function _update_7000_field_sql_storage_write($entity_type, $bundle, $entity_id, $revision_id, $field_name, $data) {
$table_name = "field_data_{$field_name}"; $table_name = "field_data_{$field_name}";
$revision_name = "field_revision_{$field_name}"; $revision_name = "field_revision_{$field_name}";
......
...@@ -448,6 +448,6 @@ function node_install() { ...@@ -448,6 +448,6 @@ function node_install() {
* *
* @ingroup update-api-7.x-to-8.x * @ingroup update-api-7.x-to-8.x
*/ */
function _update_8000_node_get_types() { function _update_7000_node_get_types() {
return db_query('SELECT * FROM {node_type}')->fetchAllAssoc('type', PDO::FETCH_OBJ); return db_query('SELECT * FROM {node_type}')->fetchAllAssoc('type', PDO::FETCH_OBJ);
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment