You are here

function og_update_7001 in Organic groups 7

Same name and namespace in other branches
  1. 7.2 og.install \og_update_7001()

Add group membership entities instead of field data.

File

./og.install, line 704
Install, update, and uninstall functions for the Organic groups module.

Code

function og_update_7001(&$sandbox) {
  $schema = og_schema_info();

  // Due to changes in the upgrade path (e.g. moving data migration to
  // og-migrate) some users already have the tables, so be careful about the
  // creation of these tables.
  if (!db_table_exists('og_membership')) {
    db_create_table('og_membership', $schema['og_membership']);
  }
  if (!db_table_exists('og_membership_type')) {
    db_create_table('og_membership_type', $schema['og_membership_type']);
  }

  // We can't call og_needs_migrate() directly, so just set the variable.
  variable_set('og_needs_migrate', TRUE);
  return t('Organic groups added group membership tables. Enable Organic groups migrate module to continue the migration of data.');
}