Commit 40034e17 authored by catch's avatar catch
Browse files

Issue #3076447 by quietone, jungle, shaktik, heddn, alexpott: Migrate D7...

Issue #3076447 by quietone, jungle, shaktik, heddn, alexpott: Migrate D7 entity translation revision translations
parent c0204735
......@@ -3414,6 +3414,42 @@
'created' => '1531922278',
'changed' => '1531922279',
))
->values(array(
'entity_type' => 'node',
'entity_id' => '11',
'revision_id' => '18',
'language' => 'en',
'source' => '',
'uid' => '1',
'status' => '1',
'translate' => '0',
'created' => '1568261523',
'changed' => '1568261687',
))
->values(array(
'entity_type' => 'node',
'entity_id' => '11',
'revision_id' => '18',
'language' => 'fr',
'source' => 'en',
'uid' => '1',
'status' => '1',
'translate' => '0',
'created' => '1568261721',
'changed' => '1568261721',
))
->values(array(
'entity_type' => 'node',
'entity_id' => '11',
'revision_id' => '18',
'language' => 'is',
'source' => 'en',
'uid' => '1',
'status' => '1',
'translate' => '0',
'created' => '1568261548',
'changed' => '1568261548',
))
->execute();
$connection->schema()->createTable('entity_translation_revision', array(
'fields' => array(
......@@ -3491,6 +3527,128 @@
'mysql_character_set' => 'utf8',
));
 
$connection->insert('entity_translation_revision')
->fields(array(
'entity_type',
'entity_id',
'revision_id',
'language',
'source',
'uid',
'status',
'translate',
'created',
'changed',
))
->values(array(
'entity_type' => 'node',
'entity_id' => '1',
'revision_id' => '1',
'language' => 'en',
'source' => '',
'uid' => '1',
'status' => '1',
'translate' => '0',
'created' => '1529615790',
'changed' => '1529615790',
))
->values(array(
'entity_type' => 'node',
'entity_id' => '11',
'revision_id' => '15',
'language' => 'en',
'source' => '',
'uid' => '1',
'status' => '1',
'translate' => '0',
'created' => '1568261523',
'changed' => '1568261523',
))
->values(array(
'entity_type' => 'node',
'entity_id' => '11',
'revision_id' => '16',
'language' => 'en',
'source' => '',
'uid' => '1',
'status' => '1',
'translate' => '0',
'created' => '1568261523',
'changed' => '1568261523',
))
->values(array(
'entity_type' => 'node',
'entity_id' => '11',
'revision_id' => '17',
'language' => 'en',
'source' => '',
'uid' => '1',
'status' => '1',
'translate' => '0',
'created' => '1568261523',
'changed' => '1568261687',
))
->values(array(
'entity_type' => 'node',
'entity_id' => '11',
'revision_id' => '18',
'language' => 'en',
'source' => '',
'uid' => '1',
'status' => '1',
'translate' => '0',
'created' => '1568261523',
'changed' => '1568261687',
))
->values(array(
'entity_type' => 'node',
'entity_id' => '11',
'revision_id' => '18',
'language' => 'fr',
'source' => 'en',
'uid' => '1',
'status' => '1',
'translate' => '0',
'created' => '1568261721',
'changed' => '1568261721',
))
->values(array(
'entity_type' => 'node',
'entity_id' => '11',
'revision_id' => '16',
'language' => 'is',
'source' => 'en',
'uid' => '1',
'status' => '1',
'translate' => '0',
'created' => '1568261548',
'changed' => '1568261548',
))
->values(array(
'entity_type' => 'node',
'entity_id' => '11',
'revision_id' => '17',
'language' => 'is',
'source' => 'en',
'uid' => '1',
'status' => '1',
'translate' => '0',
'created' => '1568261548',
'changed' => '1568261548',
))
->values(array(
'entity_type' => 'node',
'entity_id' => '11',
'revision_id' => '18',
'language' => 'is',
'source' => 'en',
'uid' => '1',
'status' => '1',
'translate' => '0',
'created' => '1568261548',
'changed' => '1568261548',
))
->execute();
$connection->schema()->createTable('field_config', array(
'fields' => array(
'id' => array(
......@@ -4339,6 +4497,21 @@
'translatable' => '0',
'deleted' => '0',
))
->values(array(
'id' => '53',
'field_name' => 'field_tree',
'type' => 'text',
'module' => 'text',
'active' => '1',
'storage_type' => 'field_sql_storage',
'storage_module' => 'field_sql_storage',
'storage_active' => '1',
'locked' => '0',
'data' => 'a:7:{s:12:"translatable";i:1;s:12:"entity_types";a:0:{}s:8:"settings";a:2:{s:10:"max_length";s:3:"255";s:23:"entity_translation_sync";b:0;}s:7:"storage";a:5:{s:4:"type";s:17:"field_sql_storage";s:8:"settings";a:0:{}s:6:"module";s:17:"field_sql_storage";s:6:"active";s:1:"1";s:7:"details";a:1:{s:3:"sql";a:2:{s:18:"FIELD_LOAD_CURRENT";a:1:{s:21:"field_data_field_tree";a:2:{s:5:"value";s:16:"field_tree_value";s:6:"format";s:17:"field_tree_format";}}s:19:"FIELD_LOAD_REVISION";a:1:{s:25:"field_revision_field_tree";a:2:{s:5:"value";s:16:"field_tree_value";s:6:"format";s:17:"field_tree_format";}}}}}s:12:"foreign keys";a:1:{s:6:"format";a:2:{s:5:"table";s:13:"filter_format";s:7:"columns";a:1:{s:6:"format";s:6:"format";}}}s:7:"indexes";a:1:{s:6:"format";a:1:{i:0;s:6:"format";}}s:2:"id";s:1:"5";}',
'cardinality' => '1',
'translatable' => '1',
'deleted' => '0',
))
->execute();
$connection->schema()->createTable('field_config_instance', array(
'fields' => array(
......@@ -5100,6 +5273,15 @@
'data' => 'a:7:{s:5:"label";s:10:"Chancellor";s:6:"widget";a:5:{s:6:"weight";s:1:"1";s:4:"type";s:14:"text_textfield";s:6:"module";s:4:"text";s:6:"active";i:1;s:8:"settings";a:1:{s:4:"size";s:2:"60";}}s:8:"settings";a:2:{s:15:"text_processing";s:1:"0";s:18:"user_register_form";b:0;}s:7:"display";a:1:{s:7:"default";a:5:{s:5:"label";s:5:"above";s:4:"type";s:12:"text_default";s:8:"settings";a:0:{}s:6:"module";s:4:"text";s:6:"weight";i:0;}}s:8:"required";i:0;s:11:"description";s:0:"";s:13:"default_value";N;}',
'deleted' => '0',
))
->values(array(
'id' => '82',
'field_id' => '53',
'field_name' => 'field_tree',
'entity_type' => 'node',
'bundle' => 'et',
'data' => 'a:7:{s:5:"label";s:4:"tree";s:6:"widget";a:5:{s:6:"weight";s:2:"-3";s:4:"type";s:14:"text_textfield";s:6:"module";s:4:"text";s:6:"active";i:1;s:8:"settings";a:1:{s:4:"size";s:2:"60";}}s:8:"settings";a:3:{s:15:"text_processing";s:1:"0";s:18:"user_register_form";b:0;s:23:"entity_translation_sync";b:0;}s:7:"display";a:1:{s:7:"default";a:5:{s:5:"label";s:5:"above";s:4:"type";s:12:"text_default";s:8:"settings";a:0:{}s:6:"module";s:4:"text";s:6:"weight";i:1;}}s:8:"required";i:0;s:11:"description";s:0:"";s:13:"default_value";N;}',
'deleted' => '0',
))
->execute();
$connection->schema()->createTable('field_data_body', array(
'fields' => array(
......@@ -5244,6 +5426,18 @@
'body_summary' => '',
'body_format' => 'filtered_html',
))
->values(array(
'entity_type' => 'node',
'bundle' => 'et',
'deleted' => '0',
'entity_id' => '11',
'revision_id' => '18',
'language' => 'und',
'delta' => '0',
'body_value' => '2nd',
'body_summary' => '',
'body_format' => 'filtered_html',
))
->execute();
$connection->schema()->createTable('field_data_comment_body', array(
'fields' => array(
......@@ -7193,8 +7387,8 @@
'language' => 'und',
'delta' => '0',
'field_link_url' => '<front>',
'field_link_title' => 'Home',
'field_link_attributes' => 'a:0:{}',
'field_link_title' => NULL,
'field_link_attributes' => 'a:1:{s:5:"title";s:0:"";}',
))
->values(array(
'entity_type' => 'node',
......@@ -7205,7 +7399,7 @@
'language' => 'und',
'delta' => '0',
'field_link_url' => '<front>',
'field_link_title' => 'Home',
'field_link_title' => NULL,
'field_link_attributes' => 'a:1:{s:5:"title";s:0:"";}',
))
->execute();
......@@ -9652,6 +9846,143 @@
'field_training_format' => NULL,
))
->execute();
$connection->schema()->createTable('field_data_field_tree', array(
'fields' => array(
'entity_type' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '128',
'default' => '',
),
'bundle' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '128',
'default' => '',
),
'deleted' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'tiny',
'default' => '0',
),
'entity_id' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'unsigned' => TRUE,
),
'revision_id' => array(
'type' => 'int',
'not null' => FALSE,
'size' => 'normal',
'unsigned' => TRUE,
),
'language' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '32',
'default' => '',
),
'delta' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'unsigned' => TRUE,
),
'field_tree_value' => array(
'type' => 'varchar',
'not null' => FALSE,
'length' => '255',
),
'field_tree_format' => array(
'type' => 'varchar',
'not null' => FALSE,
'length' => '255',
),
),
'primary key' => array(
'entity_type',
'entity_id',
'deleted',
'delta',
'language',
),
'indexes' => array(
'entity_type' => array(
'entity_type',
),
'bundle' => array(
'bundle',
),
'deleted' => array(
'deleted',
),
'entity_id' => array(
'entity_id',
),
'revision_id' => array(
'revision_id',
),
'language' => array(
'language',
),
'field_tree_format' => array(
array(
'field_tree_format',
'191',
),
),
),
'mysql_character_set' => 'utf8',
));
$connection->insert('field_data_field_tree')
->fields(array(
'entity_type',
'bundle',
'deleted',
'entity_id',
'revision_id',
'language',
'delta',
'field_tree_value',
'field_tree_format',
))
->values(array(
'entity_type' => 'node',
'bundle' => 'et',
'deleted' => '0',
'entity_id' => '11',
'revision_id' => '18',
'language' => 'en',
'delta' => '0',
'field_tree_value' => 'lancewood',
'field_tree_format' => NULL,
))
->values(array(
'entity_type' => 'node',
'bundle' => 'et',
'deleted' => '0',
'entity_id' => '11',
'revision_id' => '18',
'language' => 'fr',
'delta' => '0',
'field_tree_value' => 'fr - lancewood',
'field_tree_format' => NULL,
))
->values(array(
'entity_type' => 'node',
'bundle' => 'et',
'deleted' => '0',
'entity_id' => '11',
'revision_id' => '18',
'language' => 'is',
'delta' => '0',
'field_tree_value' => 'is - lancewood',
'field_tree_format' => NULL,
))
->execute();
$connection->schema()->createTable('field_data_field_user_entityreference', array(
'fields' => array(
'entity_type' => array(
......@@ -9751,8 +10082,8 @@
'entity_type' => 'node',
'bundle' => 'test_content_type',
'deleted' => '0',
'entity_id' => '1',
'revision_id' => '1',
'entity_id' => '2',
'revision_id' => '11',
'language' => 'und',
'delta' => '0',
'field_user_entityreference_target_id' => '2',
......@@ -10835,6 +11166,54 @@
'body_summary' => '',
'body_format' => 'filtered_html',
))
->values(array(
'entity_type' => 'node',
'bundle' => 'et',
'deleted' => '0',
'entity_id' => '11',
'revision_id' => '15',
'language' => 'und',
'delta' => '0',
'body_value' => '1st',
'body_summary' => '',
'body_format' => 'filtered_html',
))
->values(array(
'entity_type' => 'node',
'bundle' => 'et',
'deleted' => '0',
'entity_id' => '11',
'revision_id' => '16',
'language' => 'und',
'delta' => '0',
'body_value' => '1st',
'body_summary' => '',
'body_format' => 'filtered_html',
))
->values(array(
'entity_type' => 'node',
'bundle' => 'et',
'deleted' => '0',
'entity_id' => '11',
'revision_id' => '17',
'language' => 'und',
'delta' => '0',
'body_value' => '2nd',
'body_summary' => '',
'body_format' => 'filtered_html',
))
->values(array(
'entity_type' => 'node',
'bundle' => 'et',
'deleted' => '0',
'entity_id' => '11',
'revision_id' => '18',
'language' => 'und',
'delta' => '0',
'body_value' => '2nd',
'body_summary' => '',
'body_format' => 'filtered_html',
))
->execute();
$connection->schema()->createTable('field_revision_comment_body', array(
'fields' => array(
......@@ -16531,6 +16910,199 @@
'title_field_format' => NULL,
))
->execute();
$connection->schema()->createTable('field_revision_field_tree', array(
'fields' => array(
'entity_type' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '128',
'default' => '',
),
'bundle' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '128',
'default' => '',
),
'deleted' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'tiny',
'default' => '0',
),
'entity_id' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'unsigned' => TRUE,
),
'revision_id' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'unsigned' => TRUE,
),
'language' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '32',
'default' => '',
),
'delta' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'unsigned' => TRUE,
),
'field_tree_value' => array(
'type' => 'varchar',
'not null' => FALSE,
'length' => '255',
),
'field_tree_format' => array(
'type' => 'varchar',
'not null' => FALSE,
'length' => '255',
),
),
'primary key' => array(
'entity_type',
'entity_id',
'revision_id',
'deleted',
'delta',
'language',
),
'indexes' => array(
'entity_type' => array(
'entity_type',
),
'bundle' => array(
'bundle',
),
'deleted' => array(
'deleted',
),
'entity_id' => array(
'entity_id',
),
'revision_id' => array(
'revision_id',
),
'language' => array(
'language',
),
'field_tree_format' => array(
array(
'field_tree_format',
'191',
),
),
),
'mysql_character_set' => 'utf8',
));
$connection->insert('field_revision_field_tree')
->fields(array(
'entity_type',
'bundle',
'deleted',
'entity_id',
'revision_id',
'language',
'delta',
'field_tree_value',
'field_tree_format',
))
->values(array(
'entity_type' => 'node',
'bundle' => 'et',
'deleted' => '0',
'entity_id' => '11',
'revision_id' => '15',
'language' => 'en',
'delta' => '0',
'field_tree_value' => 'lancewood',
'field_tree_format' => NULL,
))
->values(array(
'entity_type' => 'node',
'bundle' => 'et',
'deleted' => '0',
'entity_id' => '11',
'revision_id' => '16',
'language' => 'en',
'delta' => '0',
'field_tree_value' => 'lancewood',
'field_tree_format' => NULL,
))
->values(array(
'entity_type' => 'node',
'bundle' => 'et',
'deleted' => '0',
'entity_id' => '11',
'revision_id' => '17',
'language' => 'en',
'delta' => '0',
'field_tree_value' => 'lancewood',
'field_tree_format' => NULL,
))
->values(array(
'entity_type' => 'node',
'bundle' => 'et',
'deleted' => '0',
'entity_id' => '11',
'revision_id' => '18',
'language' => 'en',
'delta' => '0',
'field_tree_value' => 'lancewood',
'field_tree_format' => NULL,
))
->values(array(
'entity_type' => 'node',
'bundle' => 'et',
'deleted' => '0',
'entity_id' => '11',
'revision_id' => '18',
'language' => 'fr',
'delta' => '0',
'field_tree_value' => 'fr - lancewood',
'field_tree_format' => NULL,
))
->values(array(
'entity_type' => 'node',
'bundle' => 'et',
'deleted' => '0',
'entity_id' => '11',
'revision_id' => '16',
'language' => 'is',
'delta' => '0',
'field_tree_value' => 'is - lancewood',
'field_tree_format' => NULL,
))
->values(array(
'entity_type' => 'node',
'bundle' => 'et',