I'm not sure whether this issue should belong into views or cck, but cck seems to fit a bit bettter, because content_migrate propably know the old table name, old field name and the new table name and fieldname.

There is some work already on #687564: Build a generic d6 -> d7 update api / converter
The idea is to get all d6 views, let each module do it's conversions and save the view again.
Some modules need just a rename of the field, some need a rename of the table and some need both.

After some reading in content_migrate i think it's definitive doable.

Comments

KarenS’s picture

Content Migrate definitely does know the new and old table and field names. If Views wants to create some system of using hooks we can implement the hooks to provide the right data.

At least in most cases. We do have some fields that do pretty funky things that alter column names, like the D6->D7 file fields where pretty much everything changed -- module names, table names, table column names, formatter names, etc. Some of those may be tricky.

KarenS’s picture

Status: Active » Postponed (maintainer needs more info)

@dereine, is this still something you plan to do? It looks like that issue has been postponed (or maybe even done).

dawehner’s picture

The current plan is different.

Every handler/table field/table should have a "moved to" parameter in hook_views_data.
Based on this views will one day load the right field automatically. So the view will be loaded as before.

This feature is not implemented yet but this should hopefully cover all use cases.

KarenS’s picture

Is there something that CCK should be doing here? I'm not clear on the status of this issue.

dawehner’s picture

CCK probably knows the old table, new table, old field, new field.

So views could implement hook_views_data_alter and implement the 'moved to' key.

Some examples: renaming of a table

$data['profile_values']['moved to'] = 'profile_value';

Rename a field:

  $data['comment']['comment']['moved to'] = array('field_data_comment_body', 'comment_body');

Rename just a field of a certain handler:

$data['comment']['comment']['field']['moved to'] = array('field_data_comment_body', 'comment_body');

Based on this views automatically loads the right data etc, and the old cck views continue to work.

giorgio79’s picture

Lets merge efforts, marking this as dupe of #1229192: Implement Views compatibility layer in a side module ?

giorgio79’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)