You are here

function migrate_example_wine_data_categories in Migrate 6.2

Same name and namespace in other branches
  1. 7.2 migrate_example/wine.install.inc \migrate_example_wine_data_categories()
1 call to migrate_example_wine_data_categories()
migrate_example_wine_install in migrate_example/wine.install.inc

File

migrate_example/wine.install.inc, line 996
Set up for the wine (advanced) example.

Code

function migrate_example_wine_data_categories() {
  $data = array(
    array(
      1,
      'variety',
      'White wine',
      NULL,
      'White wines are generally simpler and sweeter than red',
      3,
    ),
    array(
      3,
      'variety',
      'Red wine',
      NULL,
      'Red wines are generally more complex and "dry" than white',
      1,
    ),
    array(
      8,
      'variety',
      'Riesling',
      1,
      'Associated with Germany',
      2,
    ),
    array(
      9,
      'variety',
      'Chardonnay',
      1,
      'One of the most popular whites',
      1,
    ),
    array(
      13,
      'variety',
      'Merlot',
      3,
      'Very drinkable',
      4,
    ),
    array(
      14,
      'variety',
      'Syrah',
      3,
      'A.k.a. shiraz',
      -3,
    ),
    array(
      25,
      'variety',
      'Cabernet Sauvignon',
      3,
      'A basic',
      -5,
    ),
    array(
      26,
      'variety',
      "Nero d'Avola",
      3,
      'Sicilian specialty',
      2,
    ),
    array(
      2,
      'region',
      'Italy',
      NULL,
      'Largest producer of wine',
      5,
    ),
    array(
      11,
      'region',
      'Tuscany',
      2,
      NULL,
      2,
    ),
    array(
      18,
      'region',
      'Chianti',
      11,
      NULL,
      -1,
    ),
    array(
      19,
      'region',
      'Elba',
      11,
      NULL,
      5,
    ),
    array(
      4,
      'region',
      'France',
      NULL,
      'C\'est bon',
      6,
    ),
    array(
      5,
      'region',
      'Bordeaux',
      4,
      NULL,
      1,
    ),
    array(
      6,
      'region',
      'Barsac',
      5,
      NULL,
      3,
    ),
    array(
      7,
      'region',
      'Pomerol',
      5,
      NULL,
      2,
    ),
    array(
      16,
      'region',
      'Chile',
      NULL,
      NULL,
      3,
    ),
    array(
      17,
      'region',
      'Colchagua Valley',
      16,
      NULL,
      1,
    ),
    array(
      20,
      'region',
      'California',
      NULL,
      NULL,
      5,
    ),
    array(
      21,
      'region',
      'Redwood Valley',
      20,
      NULL,
      1,
    ),
    array(
      10,
      'best_with',
      'Beef',
      NULL,
      NULL,
      5,
    ),
    array(
      12,
      'best_with',
      'Pork',
      NULL,
      NULL,
      -3,
    ),
    array(
      15,
      'best_with',
      'Chicken',
      NULL,
      NULL,
      -5,
    ),
  );
  foreach ($data as $row) {
    db_query("INSERT INTO {migrate_example_wine_categories}\n              (categoryid, type, name, category_parent, details, ordering)\n              VALUES(%d, '%s', '%s', %d, '%s', %d)", $row);
  }
}