I am attempting to do a simple SQL migration of a CCK content type from one database to another (same version). I've discovered the node_content_xxx scheme and the use of node_type_content. Still, the content type is not appearing. Anyone know what else needs to be migrated?

Comments

Anonymous’s picture

CCK uses also the following tables :

  • node_data_field_xxx
  • node_field
  • node_field_instance
  • node_field_link_data
  • node_group
  • node_group_fields
rmutt4m’s picture

Thanks, zigazou. Do you know if these tables are used by anything other than CCK (e.g., Drupal)? Anything else I need to know? Can you point me to any docs on how CCK is constructed, other than digging through the source? I can foresee having to do this type of thing more than once.

Sorry for so many questions. Thanks again.

Anonymous’s picture

Do you know if these tables are used by anything other than CCK (e.g., Drupal)?

There should not be... Drupal core is not able to handle tables other than its own.

Keep in mind CCK can be extended by CCK-aware modules, eg. for adding new field types.

Can you point me to any docs on how CCK is constructed, other than digging through the source?

CCK has a handbook at http://drupal.org/node/101723.

Anything else I need to know?

It doesn't seem that CCK uses variables to store information.
I was wrong, In fact, as any content type (included those not created by CCK), you can have variables like :

  • content-<content type>-help,
  • node_options_content_<content type>,
  • minimum_content_<content type>_size,
  • upload_content_<content type>, used by the upload module,
  • scheduler_content_<content type>, used by the scheduler module,
  • ...

If you do a copy of tables, you should verify that CCK and CCK-aware modules are of the same version between the source and destination sites.

shanep’s picture

Hi, so I've been looking all over for a remedy to migrate a CCK Content Type (or the specific SQL tables) from a sandbox site to a live site. I looked into the Backup and Migrate module for Drupal (using Drupal 5.x) but that is only for a whole database, which I don't want to do because there are things on the live site's database that I want to stay intact - like the Ubercart user information, transactions the would be taking place at the time of migration, etc. I have also looked into the Import Export API/UI module, but when I export the Content Type that I want to migrate it doesn't bring over all of the fields that I need from the content type. For instance, I have a description, directions, and some ingredients and for all of those fields it only displays "" "" "" but it extracts the date created, title, etc.

I'm not entirely sure all of the SQL tables that are interconnected through Drupal and CCK to do a complete manual migrate. For instance, I just need the table labeled "content_type_recipe" but from everything I've read there are other tables that I may need to include. I tried exporting that table by itself and importing it but it just gave me an error and didn't proceed with the import.

Any assistance is appreciated! I have been reading about this for quite some time and am looking for the most user friendly approach so my client can eventually do this for themselves. If anyone can assist with the manual migrate, that would also be much appreciated, as I would love to know that for just personal knowledge and possibly an immediate solution.

Thanks in advance,
Shane