summaryrefslogtreecommitdiffstats
path: root/BACKPORT.txt
blob: 5423eff10e3f8c06cbc4c01b81e2b15609b93373 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
Differences visible to users/implementors:

Field handlers have no $field_info parameter in D6

D6 has no machine names for vocabularies - the D6 migrate module will basically
generate one from the the user-visible name (lower-case, spaces=>underscores),
there is a small risk of collision as a result if vocabulary names differ only
in punctuation and/or case.


Conventions to make porting changes between Drupal 6 and Drupal 7 easier:

Try to always use specific DBTNG functions such as db_select() instead of the more
general db_query(), which needs to be renamed to dbtng_query() under Drupal 6.


TODOs for initial backport to Drupal 6:

Most of the visible differences above can probably be eliminated
MigrateDestinationTerm constructor takes name instead of machine name as a
 parameter, should use a generated machine name.
node.inc: Retrieve attached fields in fields()
comment.inc: Changes needed for D6 comment_save() (form assumptions)
fields.inc: File API changes
image field support


D6/D7 differences:

*.info:
Core/PHP requirements

*.install:
D6 requires explicit install/uninstall of schema
D6 implements hook_requirements() to verify autoload 2 is present.

migrate.drush.inc:
Rollback/wipe need to run as uid 1 in D6

migrate.info:
D6 dependent on autoload/dbtng

migrate.install:
D7 update functions

migrate.module:
Includes d7.inc
migrate_field_handler_invoke_all() has no $field_info parameter in D6
migrate_watchdog() disabled in D6 (review)

includes/base.inc:
No second chance (drupal_static_reset) on low memory in D6

plugins/destinations/comment.inc:
Field differences: timestamp vs. created/changed
No fields on comments in D6
Differences in node_comment_statistics query
Table name (comments/comment)
comment_save takes array in D6.

plugins/destinations/fields.inc:
Handlers have both $instance and $field_info on D7, $instance only on D6
Field arrays keyed by language on D7 only
Fields only apply to nodes in D6
No taxonomy_term_reference in D6

plugins/destinations/node.inc:
No is_new in D6.
Teaser field in D6 only.
Body is a field API field in D7.
No node_object_prepare() in D6.

plugins/destinations/term.inc:
Fields only apply to nodes in D6.
Taxonomy API differences

plugins/destinations/user.inc:
Fields only apply to nodes in D6.

plugins/sources/sqlmap.inc:
db_table_exists/dbtng_table_exists

migrate_example/beer.inc:
Destination term specified by visible name instead of (non-existent) machine
name on D6.
No fields on users in D6.
Node IDs not preserved in D6.
Teaser is its own field in D6, not a body argument.

migrate_example/beer.install.inc:
No image field in D6 (yet)
Taxonomy API differences.
Vocabulary not a field in D6.
Difference in node_type_save parameter.
No node_add_body_field() in D6.
No user fields (gender, favs) in D6.
Field/CCK API differences.

migrate_example/migrate_example.info:
D6 dependent on content

migrate_example/migrate_example.install:
No DRUPAL_ROOT for required files in D6
No API for format creation in D6

migrate_example/wine.inc:
Destination term specified by visible name instead of (non-existent) machine
name on D6.
No fields on users in D6.
Teaser is its own field in D6, not a body argument.
Comment field differences

migrate_example/wine.install.inc:
No image field in D6 (yet)
Taxonomy API differences.
Vocabulary not a field in D6.
Difference in node_type_save parameter.
No node_add_body_field() in D6.
No user fields (gender, favs) in D6.
Field/CCK API differences.

migrate_ui/migrate_ui.module:
hook_perm() vs. hook_permission()

migrate_ui/migrate_ui.pages.inc:
D6 uses drupal_get_form(), D7 returns form array directly
D6 uses theme_table(), D7 uses '#theme' => 'table', ditto for item_list
No vertical tabs in D6
#value vs. #markup
Classes passed as arrays in D7