Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When upgrading a D6 site to D7:
Failed: DatabaseSchemaObjectDoesNotExistException: Cannot add field radioactivity_decay_profile.enable_decay: table doesn't exist. in DatabaseSchema_mysql->addField() (line 320 of /disk2/www/includes/database/mysql/schema.inc).
Analysis, in radioactivity_update_7200() there is:
db_add_field('radioactivity_decay_profile', 'enable_decay', array(
'type' => 'int',
'not null' => TRUE,
'default' => '1',
'description' => 'Is the energy decay active',
));
But there is no radioactivity_decay_profile table on the D6 site?
Comment | File | Size | Author |
---|---|---|---|
#5 | radioactivity_upgrade.patch | 6.85 KB | quicksketch |
Comments
Comment #1
boran CreditAttribution: boran commentedA quick fix was to create the table as follows and run the upgrade again:
Comment #2
tcmug CreditAttribution: tcmug commentedSorry to tell you that there is no upgrade path from versions 1.x to 2.x.
Luckily we're not dealing with hugely important data (just ordering) so I hope that is not an issue :)
Comment #3
KarenS CreditAttribution: KarenS commentedSince it is not self-evident that you have to do something manual to upgrade from D6 to D7, and since the lack of those tables creates a scary upgrade error message, it would nice to at least note this on the project page instead of having this only revealed in an old, closed issue. It would be even nicer to just provide a proper upgrade path that creates the tables.
Comment #4
quicksketchThe very least, could *some* update be added that cleans up the D6 version and makes an empty table for the D7 version? The loss of all radio activity data is also quite depressing, considering a site with 200,000 pieces of content, that's a lot of lost data. :(
Comment #5
quicksketchHere's an upgrade path that upgrades all nodes and users. It doesn't deal with radioactivity on comments (not sure how common that was), but it does the following:
- Upgrades all the radioactivity profiles.
- Creates a default "field_radioactivity" field and assigns it to all types of content that has any previous radioactivity.
- Migrates all the previous radioactivity to the new field.
- Drops the old database tables.
I'm also not sure what the "radioactivity_node_clicks" table did in Drupal 6, since it's empty in my database. Does this data also need to be upgraded? And if it did, where would it go?
Comment #6
quicksketchImproving title for clarity.
Comment #7
yan CreditAttribution: yan as a volunteer commentedPatch from #6 works for me! (in combination with patch from #2293093: EntityMalformedException on cron runs)
Comment #8
yan CreditAttribution: yan as a volunteer commentedWell, I think it still doesn't work correctly. There are no errors during the upgrade anymore. But the field has no values - the table
field_data_field_radioactivity
is empty.