Completed
Branch FET/10766/extract-activation-d... (f6eee0)
by
unknown
75:38 queued 68:03
created
help_tours/Registration_Form_Question_Groups_Help_Tour.class.php 2 patches
Indentation   +114 added lines, -114 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 if ( ! defined('EVENT_ESPRESSO_VERSION')) {
3
-    exit('NO direct script access allowed');
3
+	exit('NO direct script access allowed');
4 4
 }
5 5
 
6 6
 /**
@@ -18,130 +18,130 @@  discard block
 block discarded – undo
18 18
 class Registration_Form_Question_Groups_Help_Tour extends EE_Help_Tour
19 19
 {
20 20
     
21
-    protected function _set_tour_properties()
22
-    {
23
-        $this->_label = __('Question Groups Tour', 'event_espresso');
24
-        $this->_slug  = $this->_is_caf ? 'question-groups-caf-overview-joyride' : 'question-groups-overview-joyride';
25
-    }
21
+	protected function _set_tour_properties()
22
+	{
23
+		$this->_label = __('Question Groups Tour', 'event_espresso');
24
+		$this->_slug  = $this->_is_caf ? 'question-groups-caf-overview-joyride' : 'question-groups-overview-joyride';
25
+	}
26 26
     
27 27
     
28
-    protected function _set_tour_stops()
29
-    {
30
-        $this->_stops = array(
31
-            10 => array(
32
-                'content' => $this->_start(),
33
-            )
34
-        );
28
+	protected function _set_tour_stops()
29
+	{
30
+		$this->_stops = array(
31
+			10 => array(
32
+				'content' => $this->_start(),
33
+			)
34
+		);
35 35
         
36
-        if ($this->_is_caf) {
37
-            $this->_stops[20] = array(
38
-                'id'      => 'name',
39
-                'content' => $this->_name_stop(),
40
-                'options' => array(
41
-                    'tipLocation'    => 'top',
42
-                    'tipAdjustmentY' => -30,
43
-                    'tipAdjustmentX' => 25
44
-                )
45
-            );
46
-            $this->_stops[30] = array(
47
-                'id'      => 'description',
48
-                'content' => $this->_description_stop(),
49
-                'options' => array(
50
-                    'tipLocation'    => 'top',
51
-                    'tipAdjustmentY' => -30,
52
-                    'tipAdjustmentX' => 20
53
-                )
54
-            );
55
-            $this->_stops[40] = array(
56
-                'id'      => 'show_group_name',
57
-                'content' => $this->_show_group_name_stop(),
58
-                'options' => array(
59
-                    'tipLocation'    => 'top',
60
-                    'tipAdjustmentY' => -30,
61
-                    'tipAdjustmentX' => 20
62
-                )
63
-            );
64
-            $this->_stops[50] = array(
65
-                'id'      => 'show_group_desc',
66
-                'content' => $this->_show_group_description_stop(),
67
-                'options' => array(
68
-                    'tipLocation'    => 'top',
69
-                    'tipAdjustmentY' => -30,
70
-                    'tipAdjustmentX' => 20
71
-                )
72
-            );
73
-            $this->_stops[60] = array(
74
-                'class'   => 'bulkactions',
75
-                'content' => $this->_bulk_actions_stop(),
76
-                'options' => array(
77
-                    'tipLocation'    => 'left',
78
-                    'tipAdjustmentY' => -50,
79
-                    'tipAdjustmentX' => -80
80
-                )
81
-            );
82
-            $this->_stops[70] = array(
83
-                'id'      => 'add-new-question-group',
84
-                'content' => $this->_add_new_question_group_stop(),
85
-                'options' => array(
86
-                    'tipLocation'    => 'right',
87
-                    'tipAdjustmentY' => -50,
88
-                    'tipAdjustmentX' => 15
89
-                )
90
-            );
91
-        }
92
-    }
36
+		if ($this->_is_caf) {
37
+			$this->_stops[20] = array(
38
+				'id'      => 'name',
39
+				'content' => $this->_name_stop(),
40
+				'options' => array(
41
+					'tipLocation'    => 'top',
42
+					'tipAdjustmentY' => -30,
43
+					'tipAdjustmentX' => 25
44
+				)
45
+			);
46
+			$this->_stops[30] = array(
47
+				'id'      => 'description',
48
+				'content' => $this->_description_stop(),
49
+				'options' => array(
50
+					'tipLocation'    => 'top',
51
+					'tipAdjustmentY' => -30,
52
+					'tipAdjustmentX' => 20
53
+				)
54
+			);
55
+			$this->_stops[40] = array(
56
+				'id'      => 'show_group_name',
57
+				'content' => $this->_show_group_name_stop(),
58
+				'options' => array(
59
+					'tipLocation'    => 'top',
60
+					'tipAdjustmentY' => -30,
61
+					'tipAdjustmentX' => 20
62
+				)
63
+			);
64
+			$this->_stops[50] = array(
65
+				'id'      => 'show_group_desc',
66
+				'content' => $this->_show_group_description_stop(),
67
+				'options' => array(
68
+					'tipLocation'    => 'top',
69
+					'tipAdjustmentY' => -30,
70
+					'tipAdjustmentX' => 20
71
+				)
72
+			);
73
+			$this->_stops[60] = array(
74
+				'class'   => 'bulkactions',
75
+				'content' => $this->_bulk_actions_stop(),
76
+				'options' => array(
77
+					'tipLocation'    => 'left',
78
+					'tipAdjustmentY' => -50,
79
+					'tipAdjustmentX' => -80
80
+				)
81
+			);
82
+			$this->_stops[70] = array(
83
+				'id'      => 'add-new-question-group',
84
+				'content' => $this->_add_new_question_group_stop(),
85
+				'options' => array(
86
+					'tipLocation'    => 'right',
87
+					'tipAdjustmentY' => -50,
88
+					'tipAdjustmentX' => 15
89
+				)
90
+			);
91
+		}
92
+	}
93 93
     
94 94
     
95
-    protected function _start()
96
-    {
97
-        $content = '<h3>' . __('Question Groups', 'event_espresso') . '</h3>';
98
-        if ($this->_is_caf) {
99
-            $content .= '<p>' . __('This tour of the Question Groups page will go over different areas of the screen to help you understand what they are used for.',
100
-                    'event_espresso') . '</p>';
101
-        } else {
102
-            $content .= '<p>' . __('Sorry, Event Espresso Decaf does not have this feature. Please purchase a support license to get access to this feature.',
103
-                    'event_espresso') . '</p>';
104
-        }
95
+	protected function _start()
96
+	{
97
+		$content = '<h3>' . __('Question Groups', 'event_espresso') . '</h3>';
98
+		if ($this->_is_caf) {
99
+			$content .= '<p>' . __('This tour of the Question Groups page will go over different areas of the screen to help you understand what they are used for.',
100
+					'event_espresso') . '</p>';
101
+		} else {
102
+			$content .= '<p>' . __('Sorry, Event Espresso Decaf does not have this feature. Please purchase a support license to get access to this feature.',
103
+					'event_espresso') . '</p>';
104
+		}
105 105
         
106
-        return $content;
107
-    }
106
+		return $content;
107
+	}
108 108
     
109
-    protected function _name_stop()
110
-    {
111
-        return '<p>' . __('View available questions groups. You can reorder your questions by dragging and dropping them.',
112
-            'event_espresso') . '</p>';
113
-    }
109
+	protected function _name_stop()
110
+	{
111
+		return '<p>' . __('View available questions groups. You can reorder your questions by dragging and dropping them.',
112
+			'event_espresso') . '</p>';
113
+	}
114 114
     
115
-    protected function _description_stop()
116
-    {
117
-        return '<p>' . __('View the question group description.', 'event_espresso') . '</p>';
118
-    }
115
+	protected function _description_stop()
116
+	{
117
+		return '<p>' . __('View the question group description.', 'event_espresso') . '</p>';
118
+	}
119 119
     
120
-    protected function _show_group_name_stop()
121
-    {
122
-        return '<p>' . __('View if the name of the question group should be shown to customers.',
123
-            'event_espresso') . '</p>';
124
-    }
120
+	protected function _show_group_name_stop()
121
+	{
122
+		return '<p>' . __('View if the name of the question group should be shown to customers.',
123
+			'event_espresso') . '</p>';
124
+	}
125 125
     
126
-    protected function _show_group_description_stop()
127
-    {
128
-        return '<p>' . __('View if the description of the question group should be shown to customers.',
129
-            'event_espresso') . '</p>';
130
-    }
126
+	protected function _show_group_description_stop()
127
+	{
128
+		return '<p>' . __('View if the description of the question group should be shown to customers.',
129
+			'event_espresso') . '</p>';
130
+	}
131 131
     
132
-    protected function _bulk_actions_stop()
133
-    {
134
-        return '<p>' . __('Perform bulk actions to multiple question groups.', 'event_espresso') . '</p>';
135
-    }
132
+	protected function _bulk_actions_stop()
133
+	{
134
+		return '<p>' . __('Perform bulk actions to multiple question groups.', 'event_espresso') . '</p>';
135
+	}
136 136
     
137
-    protected function _search_stop()
138
-    {
139
-        return '<p>' . __('Search through questions. The following sources will be searched: question group name and question group description.',
140
-            'event_espresso') . '</p>';
141
-    }
137
+	protected function _search_stop()
138
+	{
139
+		return '<p>' . __('Search through questions. The following sources will be searched: question group name and question group description.',
140
+			'event_espresso') . '</p>';
141
+	}
142 142
     
143
-    protected function _add_new_question_group_stop()
144
-    {
145
-        return '<p>' . __('Click here to create a new question group.', 'event_espresso') . '</p>';
146
-    }
143
+	protected function _add_new_question_group_stop()
144
+	{
145
+		return '<p>' . __('Click here to create a new question group.', 'event_espresso') . '</p>';
146
+	}
147 147
 }
148 148
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -94,13 +94,13 @@  discard block
 block discarded – undo
94 94
     
95 95
     protected function _start()
96 96
     {
97
-        $content = '<h3>' . __('Question Groups', 'event_espresso') . '</h3>';
97
+        $content = '<h3>'.__('Question Groups', 'event_espresso').'</h3>';
98 98
         if ($this->_is_caf) {
99
-            $content .= '<p>' . __('This tour of the Question Groups page will go over different areas of the screen to help you understand what they are used for.',
100
-                    'event_espresso') . '</p>';
99
+            $content .= '<p>'.__('This tour of the Question Groups page will go over different areas of the screen to help you understand what they are used for.',
100
+                    'event_espresso').'</p>';
101 101
         } else {
102
-            $content .= '<p>' . __('Sorry, Event Espresso Decaf does not have this feature. Please purchase a support license to get access to this feature.',
103
-                    'event_espresso') . '</p>';
102
+            $content .= '<p>'.__('Sorry, Event Espresso Decaf does not have this feature. Please purchase a support license to get access to this feature.',
103
+                    'event_espresso').'</p>';
104 104
         }
105 105
         
106 106
         return $content;
@@ -108,40 +108,40 @@  discard block
 block discarded – undo
108 108
     
109 109
     protected function _name_stop()
110 110
     {
111
-        return '<p>' . __('View available questions groups. You can reorder your questions by dragging and dropping them.',
112
-            'event_espresso') . '</p>';
111
+        return '<p>'.__('View available questions groups. You can reorder your questions by dragging and dropping them.',
112
+            'event_espresso').'</p>';
113 113
     }
114 114
     
115 115
     protected function _description_stop()
116 116
     {
117
-        return '<p>' . __('View the question group description.', 'event_espresso') . '</p>';
117
+        return '<p>'.__('View the question group description.', 'event_espresso').'</p>';
118 118
     }
119 119
     
120 120
     protected function _show_group_name_stop()
121 121
     {
122
-        return '<p>' . __('View if the name of the question group should be shown to customers.',
123
-            'event_espresso') . '</p>';
122
+        return '<p>'.__('View if the name of the question group should be shown to customers.',
123
+            'event_espresso').'</p>';
124 124
     }
125 125
     
126 126
     protected function _show_group_description_stop()
127 127
     {
128
-        return '<p>' . __('View if the description of the question group should be shown to customers.',
129
-            'event_espresso') . '</p>';
128
+        return '<p>'.__('View if the description of the question group should be shown to customers.',
129
+            'event_espresso').'</p>';
130 130
     }
131 131
     
132 132
     protected function _bulk_actions_stop()
133 133
     {
134
-        return '<p>' . __('Perform bulk actions to multiple question groups.', 'event_espresso') . '</p>';
134
+        return '<p>'.__('Perform bulk actions to multiple question groups.', 'event_espresso').'</p>';
135 135
     }
136 136
     
137 137
     protected function _search_stop()
138 138
     {
139
-        return '<p>' . __('Search through questions. The following sources will be searched: question group name and question group description.',
140
-            'event_espresso') . '</p>';
139
+        return '<p>'.__('Search through questions. The following sources will be searched: question group name and question group description.',
140
+            'event_espresso').'</p>';
141 141
     }
142 142
     
143 143
     protected function _add_new_question_group_stop()
144 144
     {
145
-        return '<p>' . __('Click here to create a new question group.', 'event_espresso') . '</p>';
145
+        return '<p>'.__('Click here to create a new question group.', 'event_espresso').'</p>';
146 146
     }
147 147
 }
148 148
\ No newline at end of file
Please login to merge, or discard this patch.
general_settings/help_tours/Your_Organization_Help_Tour.class.php 2 patches
Indentation   +106 added lines, -106 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 if ( ! defined('EVENT_ESPRESSO_VERSION')) {
3
-    exit('NO direct script access allowed');
3
+	exit('NO direct script access allowed');
4 4
 }
5 5
 
6 6
 /**
@@ -18,121 +18,121 @@  discard block
 block discarded – undo
18 18
 class Your_Organization_Help_Tour extends EE_Help_Tour
19 19
 {
20 20
     
21
-    protected function _set_tour_properties()
22
-    {
23
-        $this->_label = __('Your Organization Tour', 'event_espresso');
24
-        $this->_slug  = 'your-organization-joyride';
25
-    }
21
+	protected function _set_tour_properties()
22
+	{
23
+		$this->_label = __('Your Organization Tour', 'event_espresso');
24
+		$this->_slug  = 'your-organization-joyride';
25
+	}
26 26
     
27 27
     
28
-    protected function _set_tour_stops()
29
-    {
30
-        $this->_stops = array(
31
-            10 => array(
32
-                'content' => $this->_start(),
33
-            ),
34
-            30 => array(
35
-                'id'      => 'contact_info_h4',
36
-                'content' => $this->_contact_information_stop(),
37
-                'options' => array(
38
-                    'tipLocation'    => 'left',
39
-                    'tipAdjustmentY' => -50,
40
-                    'tipAdjustmentX' => 15
41
-                )
42
-            ),
43
-            40 => array(
44
-                'id'      => 'upload_image',
45
-                'content' => $this->_upload_image_stop(),
46
-                'options' => array(
47
-                    'tipLocation'    => 'right',
48
-                    'tipAdjustmentY' => -50,
49
-                    'tipAdjustmentX' => 15
50
-                )
51
-            ),
52
-            50 => array(
53
-                'id'      => 'organization_facebook',
54
-                'content' => $this->_organization_facebook_stop(),
55
-                'options' => array(
56
-                    'tipLocation'    => 'right',
57
-                    'tipAdjustmentY' => -50,
58
-                    'tipAdjustmentX' => 15
59
-                )
60
-            ),
61
-            60 => array(
62
-                'id'      => 'ueip_optin',
63
-                'content' => $this->_ueip_option_stop(),
64
-                'options' => array(
65
-                    'tipLocation'    => 'right',
66
-                    'tipAdjustmentY' => -50,
67
-                    'tipAdjustmentX' => 15
68
-                )
69
-            ),
70
-            70 => array(
71
-                'id'      => 'espresso_major_buttons_wrapper',
72
-                'content' => $this->_end_tour_stop(),
73
-                'options' => array(
74
-                    'tipLocation'    => 'right',
75
-                    'tipAdjustmentY' => -50,
76
-                    'tipAdjustmentX' => 185
77
-                )
78
-            )
79
-        );
28
+	protected function _set_tour_stops()
29
+	{
30
+		$this->_stops = array(
31
+			10 => array(
32
+				'content' => $this->_start(),
33
+			),
34
+			30 => array(
35
+				'id'      => 'contact_info_h4',
36
+				'content' => $this->_contact_information_stop(),
37
+				'options' => array(
38
+					'tipLocation'    => 'left',
39
+					'tipAdjustmentY' => -50,
40
+					'tipAdjustmentX' => 15
41
+				)
42
+			),
43
+			40 => array(
44
+				'id'      => 'upload_image',
45
+				'content' => $this->_upload_image_stop(),
46
+				'options' => array(
47
+					'tipLocation'    => 'right',
48
+					'tipAdjustmentY' => -50,
49
+					'tipAdjustmentX' => 15
50
+				)
51
+			),
52
+			50 => array(
53
+				'id'      => 'organization_facebook',
54
+				'content' => $this->_organization_facebook_stop(),
55
+				'options' => array(
56
+					'tipLocation'    => 'right',
57
+					'tipAdjustmentY' => -50,
58
+					'tipAdjustmentX' => 15
59
+				)
60
+			),
61
+			60 => array(
62
+				'id'      => 'ueip_optin',
63
+				'content' => $this->_ueip_option_stop(),
64
+				'options' => array(
65
+					'tipLocation'    => 'right',
66
+					'tipAdjustmentY' => -50,
67
+					'tipAdjustmentX' => 15
68
+				)
69
+			),
70
+			70 => array(
71
+				'id'      => 'espresso_major_buttons_wrapper',
72
+				'content' => $this->_end_tour_stop(),
73
+				'options' => array(
74
+					'tipLocation'    => 'right',
75
+					'tipAdjustmentY' => -50,
76
+					'tipAdjustmentX' => 185
77
+				)
78
+			)
79
+		);
80 80
         
81
-        if (is_main_site()) {
82
-            $this->_stops[20] = array(
83
-                'id' => 'site_license_key',
84
-                'content' => $this->_site_license_key_stop(),
85
-                'options' => array(
86
-                    'tipLocation' => 'right',
87
-                    'tipAdjustmentY' => -50,
88
-                    'tipAdjustmentX' => 15
89
-                )
90
-            );
91
-        }
92
-        ksort( $this->_stops );
93
-    }
81
+		if (is_main_site()) {
82
+			$this->_stops[20] = array(
83
+				'id' => 'site_license_key',
84
+				'content' => $this->_site_license_key_stop(),
85
+				'options' => array(
86
+					'tipLocation' => 'right',
87
+					'tipAdjustmentY' => -50,
88
+					'tipAdjustmentX' => 15
89
+				)
90
+			);
91
+		}
92
+		ksort( $this->_stops );
93
+	}
94 94
     
95 95
     
96
-    protected function _start()
97
-    {
98
-        $content = '<h3>' . __('Organization Settings', 'event_espresso') . '</h3>';
99
-        $content .= '<p>' . __('This tour of the Your Organization page will go over different areas of the screen to help you understand what they are used for.',
100
-                'event_espresso') . '</p>';
96
+	protected function _start()
97
+	{
98
+		$content = '<h3>' . __('Organization Settings', 'event_espresso') . '</h3>';
99
+		$content .= '<p>' . __('This tour of the Your Organization page will go over different areas of the screen to help you understand what they are used for.',
100
+				'event_espresso') . '</p>';
101 101
         
102
-        return $content;
103
-    }
102
+		return $content;
103
+	}
104 104
     
105
-    protected function _site_license_key_stop()
106
-    {
107
-        return '<p>' . __('Enter your support license key here to enable one-click updates.',
108
-            'event_espresso') . '</p>';
109
-    }
105
+	protected function _site_license_key_stop()
106
+	{
107
+		return '<p>' . __('Enter your support license key here to enable one-click updates.',
108
+			'event_espresso') . '</p>';
109
+	}
110 110
     
111
-    protected function _contact_information_stop()
112
-    {
113
-        return '<p>' . __('You can change your business / organization information below. Be sure to keep this information updated as it is used in other areas of the site. Adjusting the country option here will update your currency settings. More options are available in the Countries tab.',
114
-            'event_espresso') . '</p>';
115
-    }
111
+	protected function _contact_information_stop()
112
+	{
113
+		return '<p>' . __('You can change your business / organization information below. Be sure to keep this information updated as it is used in other areas of the site. Adjusting the country option here will update your currency settings. More options are available in the Countries tab.',
114
+			'event_espresso') . '</p>';
115
+	}
116 116
     
117
-    protected function _upload_image_stop()
118
-    {
119
-        return '<p>' . __('Add a logo. This can be used for invoices and tickets.', 'event_espresso') . '</p>';
120
-    }
117
+	protected function _upload_image_stop()
118
+	{
119
+		return '<p>' . __('Add a logo. This can be used for invoices and tickets.', 'event_espresso') . '</p>';
120
+	}
121 121
     
122
-    protected function _organization_facebook_stop()
123
-    {
124
-        return '<p>' . __('Add links to various social media networks.', 'event_espresso') . '</p>';
125
-    }
122
+	protected function _organization_facebook_stop()
123
+	{
124
+		return '<p>' . __('Add links to various social media networks.', 'event_espresso') . '</p>';
125
+	}
126 126
     
127
-    protected function _ueip_option_stop()
128
-    {
129
-        return '<p>' . __('Help us to help you! Sign up to the User eXperience Improvement Program and send us anonymous data that will help us improve Event Espresso.',
130
-            'event_espresso') . '</p>';
131
-    }
127
+	protected function _ueip_option_stop()
128
+	{
129
+		return '<p>' . __('Help us to help you! Sign up to the User eXperience Improvement Program and send us anonymous data that will help us improve Event Espresso.',
130
+			'event_espresso') . '</p>';
131
+	}
132 132
     
133
-    protected function _end_tour_stop()
134
-    {
135
-        return '<p>' . __('You are almost done updating Your Organization information. Click on the Save button to save changes and then go to the Payment Methods screen so you can setup a payment gateway.',
136
-            'event_espresso') . '</p>';
137
-    }
133
+	protected function _end_tour_stop()
134
+	{
135
+		return '<p>' . __('You are almost done updating Your Organization information. Click on the Save button to save changes and then go to the Payment Methods screen so you can setup a payment gateway.',
136
+			'event_espresso') . '</p>';
137
+	}
138 138
 }
139 139
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -89,50 +89,50 @@
 block discarded – undo
89 89
                 )
90 90
             );
91 91
         }
92
-        ksort( $this->_stops );
92
+        ksort($this->_stops);
93 93
     }
94 94
     
95 95
     
96 96
     protected function _start()
97 97
     {
98
-        $content = '<h3>' . __('Organization Settings', 'event_espresso') . '</h3>';
99
-        $content .= '<p>' . __('This tour of the Your Organization page will go over different areas of the screen to help you understand what they are used for.',
100
-                'event_espresso') . '</p>';
98
+        $content = '<h3>'.__('Organization Settings', 'event_espresso').'</h3>';
99
+        $content .= '<p>'.__('This tour of the Your Organization page will go over different areas of the screen to help you understand what they are used for.',
100
+                'event_espresso').'</p>';
101 101
         
102 102
         return $content;
103 103
     }
104 104
     
105 105
     protected function _site_license_key_stop()
106 106
     {
107
-        return '<p>' . __('Enter your support license key here to enable one-click updates.',
108
-            'event_espresso') . '</p>';
107
+        return '<p>'.__('Enter your support license key here to enable one-click updates.',
108
+            'event_espresso').'</p>';
109 109
     }
110 110
     
111 111
     protected function _contact_information_stop()
112 112
     {
113
-        return '<p>' . __('You can change your business / organization information below. Be sure to keep this information updated as it is used in other areas of the site. Adjusting the country option here will update your currency settings. More options are available in the Countries tab.',
114
-            'event_espresso') . '</p>';
113
+        return '<p>'.__('You can change your business / organization information below. Be sure to keep this information updated as it is used in other areas of the site. Adjusting the country option here will update your currency settings. More options are available in the Countries tab.',
114
+            'event_espresso').'</p>';
115 115
     }
116 116
     
117 117
     protected function _upload_image_stop()
118 118
     {
119
-        return '<p>' . __('Add a logo. This can be used for invoices and tickets.', 'event_espresso') . '</p>';
119
+        return '<p>'.__('Add a logo. This can be used for invoices and tickets.', 'event_espresso').'</p>';
120 120
     }
121 121
     
122 122
     protected function _organization_facebook_stop()
123 123
     {
124
-        return '<p>' . __('Add links to various social media networks.', 'event_espresso') . '</p>';
124
+        return '<p>'.__('Add links to various social media networks.', 'event_espresso').'</p>';
125 125
     }
126 126
     
127 127
     protected function _ueip_option_stop()
128 128
     {
129
-        return '<p>' . __('Help us to help you! Sign up to the User eXperience Improvement Program and send us anonymous data that will help us improve Event Espresso.',
130
-            'event_espresso') . '</p>';
129
+        return '<p>'.__('Help us to help you! Sign up to the User eXperience Improvement Program and send us anonymous data that will help us improve Event Espresso.',
130
+            'event_espresso').'</p>';
131 131
     }
132 132
     
133 133
     protected function _end_tour_stop()
134 134
     {
135
-        return '<p>' . __('You are almost done updating Your Organization information. Click on the Save button to save changes and then go to the Payment Methods screen so you can setup a payment gateway.',
136
-            'event_espresso') . '</p>';
135
+        return '<p>'.__('You are almost done updating Your Organization information. Click on the Save button to save changes and then go to the Payment Methods screen so you can setup a payment gateway.',
136
+            'event_espresso').'</p>';
137 137
     }
138 138
 }
139 139
\ No newline at end of file
Please login to merge, or discard this patch.
admin_pages/maintenance/templates/migration_options_from_ee3.template.php 1 patch
Indentation   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
         <span class="dashicons dashicons-admin-tools"></span>
27 27
         <?php esc_html_e("Migration Options", "event_espresso"); ?>
28 28
         <span class="tiny-text lt-grey-text"> &nbsp; <?php esc_html_e(' to migrate or not to migrate?',
29
-                    "event_espresso"); ?></span>
29
+					"event_espresso"); ?></span>
30 30
     </h2>
31 31
     <div class="ee-table-wrap">
32 32
         <table>
@@ -35,24 +35,24 @@  discard block
 block discarded – undo
35 35
                 <td><h3><?php esc_html_e('1', 'event_espresso'); ?></h3></td>
36 36
                 <td>
37 37
                     <?php
38
-                    echo apply_filters(
39
-                            'FHEE__ee_migration_page__option_1_main',
40
-                            sprintf(
41
-                                    esc_html__('%1$sYes. I have backed up my database%2$s, %3$sunderstand the risks involved%4$s, and am ready to migrate my existing %5$s data to %6$s.',
42
-                                            "event_espresso"),
43
-                                    '<strong>',
44
-                                    '</strong>',
45
-                                    '<a id="migration-risks" class="" title="'
46
-                                    . esc_attr__('click for more details', "event_espresso")
47
-                                    . '">',
48
-                                    '</a>',
49
-                                    $current_db_state,
50
-                                    $next_db_state
51
-                            ),
52
-                            $current_db_state,
53
-                            $next_db_state
54
-                    );
55
-                    ?>
38
+					echo apply_filters(
39
+							'FHEE__ee_migration_page__option_1_main',
40
+							sprintf(
41
+									esc_html__('%1$sYes. I have backed up my database%2$s, %3$sunderstand the risks involved%4$s, and am ready to migrate my existing %5$s data to %6$s.',
42
+											"event_espresso"),
43
+									'<strong>',
44
+									'</strong>',
45
+									'<a id="migration-risks" class="" title="'
46
+									. esc_attr__('click for more details', "event_espresso")
47
+									. '">',
48
+									'</a>',
49
+									$current_db_state,
50
+									$next_db_state
51
+							),
52
+							$current_db_state,
53
+							$next_db_state
54
+					);
55
+					?>
56 56
                     <a id="display-migration-details"
57 57
                        class="display-the-hidden lt-grey-text smaller-text hide-if-no-js"
58 58
                        rel="migration-details"><?php esc_html_e('click for more details', "event_espresso"); ?>
@@ -61,37 +61,37 @@  discard block
 block discarded – undo
61 61
                        class="hide-the-displayed lt-grey-text smaller-text hide-if-no-js"
62 62
                        rel="migration-details"
63 63
                        style="display:none;"><?php echo sprintf(esc_html__('hide%1$sdetails%1$s-',
64
-                                'event_espresso'), '&nbsp;'); ?></a>
64
+								'event_espresso'), '&nbsp;'); ?></a>
65 65
                 </td>
66 66
                 <td>
67 67
                     <a id="db-backed-up"
68 68
                        class="toggle-migration-monitor button-primary"><?php echo apply_filters('FHEE__ee_migration_page__option_1_button_text',
69
-                                sprintf(esc_html__("Migrate My %s Data to %s", "event_espresso"), $current_db_state,
70
-                                        $next_db_state), $current_db_state, $next_db_state); ?></a>
69
+								sprintf(esc_html__("Migrate My %s Data to %s", "event_espresso"), $current_db_state,
70
+										$next_db_state), $current_db_state, $next_db_state); ?></a>
71 71
                 </td>
72 72
             </tr>
73 73
             <tr>
74 74
                 <td colspan="3" style="padding: 0">
75 75
                     <div id="migration-details-dv" style="display: none; padding: 1em;">
76 76
 <span class="reminder-spn"><?php printf(esc_html__("%s Important: %s Before migrating, please back up your database and files.",
77
-            "event_espresso"), "<b>", "</b>"); ?></span>
77
+			"event_espresso"), "<b>", "</b>"); ?></span>
78 78
                         <p>
79 79
                             <?php
80
-                            printf(
81
-                                    esc_html__('%1$sNot sure how to backup your existing data?%2$s Here is %3$sWordPress\'s explanation%7$s, and here\'s %6$sour explanation%7$s.%8$sYou can also search the WordPress plugin database for %4$s database backup plugins %7$s,%8$sor have one of our dedicated support technicians help you by purchasing a %5$sPriority Support Token%7$s.',
82
-                                            "event_espresso"),
83
-                                    '<b>',
84
-                                    '</b>',
85
-                                    "<a href='http://codex.wordpress.org/Backing_Up_Your_Database'>",
86
-                                    "<a href='"
87
-                                    . admin_url('plugin-install.php?tab=search&type=term&s=database+backup&plugin-search-input=Search+Plugins')
88
-                                    . "'>",
89
-                                    "<a href='http://eventespresso.com/product/priority-support-tokens/'>",
90
-                                    '<a href="http://eventespresso.com/wiki/how-to-back-up-your-site/">',
91
-                                    "</a>",
92
-                                    '<br/>'
93
-                            );
94
-                            ?>
80
+							printf(
81
+									esc_html__('%1$sNot sure how to backup your existing data?%2$s Here is %3$sWordPress\'s explanation%7$s, and here\'s %6$sour explanation%7$s.%8$sYou can also search the WordPress plugin database for %4$s database backup plugins %7$s,%8$sor have one of our dedicated support technicians help you by purchasing a %5$sPriority Support Token%7$s.',
82
+											"event_espresso"),
83
+									'<b>',
84
+									'</b>',
85
+									"<a href='http://codex.wordpress.org/Backing_Up_Your_Database'>",
86
+									"<a href='"
87
+									. admin_url('plugin-install.php?tab=search&type=term&s=database+backup&plugin-search-input=Search+Plugins')
88
+									. "'>",
89
+									"<a href='http://eventespresso.com/product/priority-support-tokens/'>",
90
+									'<a href="http://eventespresso.com/wiki/how-to-back-up-your-site/">',
91
+									"</a>",
92
+									'<br/>'
93
+							);
94
+							?>
95 95
                         </p>
96 96
                         <?php do_action('AHEE__ee_migration_page__option_1_extra_details'); ?>
97 97
                     </div>
@@ -101,12 +101,12 @@  discard block
 block discarded – undo
101 101
                 <td><h3><?php esc_html_e('2', 'event_espresso'); ?></h3></td>
102 102
                 <td>
103 103
                     <?php echo apply_filters('FHEE__ee_migration_page__option_2_main',
104
-                            sprintf(esc_html__('I do NOT want to migrate my %1$s data to %2$s at this time and just want to use %3$s without migrating data.',
105
-                                    "event_espresso"), $current_db_state, $next_db_state,
106
-                                    $ultimate_db_state), $current_db_state, $next_db_state,
107
-                            $ultimate_db_state); ?><br/>
104
+							sprintf(esc_html__('I do NOT want to migrate my %1$s data to %2$s at this time and just want to use %3$s without migrating data.',
105
+									"event_espresso"), $current_db_state, $next_db_state,
106
+									$ultimate_db_state), $current_db_state, $next_db_state,
107
+							$ultimate_db_state); ?><br/>
108 108
                     <span class="reminder-spn"><?php esc_html_e('Please Note: In order to avoid errors, any existing Event Espresso data (events, ticket, registrations, etc) in your db will be erased! Regular WP data will NOT be affected.',
109
-                                'event_espresso'); ?></span>
109
+								'event_espresso'); ?></span>
110 110
                     <a id="display-no-migration-details"
111 111
                        class="display-the-hidden lt-grey-text smaller-text hide-if-no-js"
112 112
                        rel="no-migration-details"><?php esc_html_e('click for more details', "event_espresso"); ?>
@@ -115,13 +115,13 @@  discard block
 block discarded – undo
115 115
                        class="hide-the-displayed lt-grey-text smaller-text hide-if-no-js"
116 116
                        rel="no-migration-details"
117 117
                        style="display:none;"><?php echo sprintf(esc_html__('hide%1$sdetails%1$s-',
118
-                                'event_espresso'), '&nbsp;'); ?></a>
118
+								'event_espresso'), '&nbsp;'); ?></a>
119 119
                 </td>
120 120
                 <td>
121 121
                     <a id="do-not-migrate" class="do-not-migrate button-primary"
122 122
                        href="<?php echo $reset_db_page_link; ?>"><?php echo apply_filters('FHEE__ee_migration_page__option_2_button_text',
123
-                                sprintf(esc_html__("Just Start %s and Delete Existing Data", "event_espresso"),
124
-                                        $ultimate_db_state), $ultimate_db_state); ?></a>
123
+								sprintf(esc_html__("Just Start %s and Delete Existing Data", "event_espresso"),
124
+										$ultimate_db_state), $ultimate_db_state); ?></a>
125 125
                 </td>
126 126
             </tr>
127 127
             <tr>
@@ -129,8 +129,8 @@  discard block
 block discarded – undo
129 129
                     <div id="no-migration-details-dv" style="display: none; padding: 1em;">
130 130
                         <p>
131 131
                             <?php echo apply_filters('FHEE__ee_migration_page__option_2_details',
132
-                                    sprintf(esc_html__("If your existing Event and Registration Data is no longer relevant nor required, you can just start up %s without performing a data migration.",
133
-                                            "event_espresso"), $ultimate_db_state), $ultimate_db_state); ?>
132
+									sprintf(esc_html__("If your existing Event and Registration Data is no longer relevant nor required, you can just start up %s without performing a data migration.",
133
+											"event_espresso"), $ultimate_db_state), $ultimate_db_state); ?>
134 134
                         </p>
135 135
                     </div>
136 136
                 </td>
Please login to merge, or discard this patch.
core/data_migration_scripts/EE_DMS_Core_4_2_0.dms.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 //unfortunately, this needs to be done upon INCLUSION of this file,
13 13
 //instead of construction, because it only gets constructed on first page load
14 14
 //(all other times it gets resurrected from a wordpress option)
15
-$stages = glob(EE_CORE . 'data_migration_scripts/4_2_0_stages/*');
15
+$stages = glob(EE_CORE.'data_migration_scripts/4_2_0_stages/*');
16 16
 $class_to_filepath = array();
17 17
 if ( ! empty($stages)) {
18 18
     foreach ($stages as $filepath) {
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 //			echo "no version string provided: $version_string";
62 62
             //no version string provided... this must be pre 4.1
63 63
             //because since 4.1 we're
64
-            return false;//changed mind. dont want people thinking they should migrate yet because they cant
64
+            return false; //changed mind. dont want people thinking they should migrate yet because they cant
65 65
         } else {
66 66
 //			echo "$version_string doesnt apply";
67 67
             return false;
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
     public function schema_changes_before_migration()
81 81
     {
82 82
         //relies on 4.1's EEH_Activation::create_table
83
-        require_once(EE_HELPERS . 'EEH_Activation.helper.php');
83
+        require_once(EE_HELPERS.'EEH_Activation.helper.php');
84 84
         $table_name = 'esp_answer';
85 85
         $sql = " ANS_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
86 86
 					REG_ID INT UNSIGNED NOT NULL,
Please login to merge, or discard this patch.
Indentation   +148 added lines, -148 removed lines patch added patch discarded remove patch
@@ -15,11 +15,11 @@  discard block
 block discarded – undo
15 15
 $stages = glob(EE_CORE . 'data_migration_scripts/4_2_0_stages/*');
16 16
 $class_to_filepath = array();
17 17
 if ( ! empty($stages)) {
18
-    foreach ($stages as $filepath) {
19
-        $matches = array();
20
-        preg_match('~4_2_0_stages/(.*).dmsstage.php~', $filepath, $matches);
21
-        $class_to_filepath[$matches[1]] = $filepath;
22
-    }
18
+	foreach ($stages as $filepath) {
19
+		$matches = array();
20
+		preg_match('~4_2_0_stages/(.*).dmsstage.php~', $filepath, $matches);
21
+		$class_to_filepath[$matches[1]] = $filepath;
22
+	}
23 23
 }
24 24
 //give addons a chance to autoload their stages too
25 25
 $class_to_filepath = apply_filters('FHEE__EE_DMS_4_2_0__autoloaded_stages', $class_to_filepath);
@@ -32,57 +32,57 @@  discard block
 block discarded – undo
32 32
 
33 33
 
34 34
 
35
-    /**
36
-     * EE_DMS_Core_4_2_0 constructor.
37
-     *
38
-     * @param TableManager  $table_manager
39
-     * @param TableAnalysis $table_analysis
40
-     */
41
-    public function __construct(TableManager $table_manager = null, TableAnalysis $table_analysis = null)
42
-    {
43
-        $this->_pretty_name = esc_html__("Data Update to Event Espresso 4.2.0", "event_espresso");
44
-        $this->_priority = 10;
45
-        $this->_migration_stages = array(
46
-            new EE_DMS_4_2_0_question_group_questions(),
47
-            new EE_DMS_4_2_0_datetime_fields(),
48
-        );
49
-        parent::__construct($table_manager, $table_analysis);
50
-    }
35
+	/**
36
+	 * EE_DMS_Core_4_2_0 constructor.
37
+	 *
38
+	 * @param TableManager  $table_manager
39
+	 * @param TableAnalysis $table_analysis
40
+	 */
41
+	public function __construct(TableManager $table_manager = null, TableAnalysis $table_analysis = null)
42
+	{
43
+		$this->_pretty_name = esc_html__("Data Update to Event Espresso 4.2.0", "event_espresso");
44
+		$this->_priority = 10;
45
+		$this->_migration_stages = array(
46
+			new EE_DMS_4_2_0_question_group_questions(),
47
+			new EE_DMS_4_2_0_datetime_fields(),
48
+		);
49
+		parent::__construct($table_manager, $table_analysis);
50
+	}
51 51
 
52 52
 
53 53
 
54
-    public function can_migrate_from_version($version_array)
55
-    {
56
-        $version_string = $version_array['Core'];
57
-        if (version_compare($version_string, '4.2.0', '<=') && version_compare($version_string, '4.1.0', '>=')) {
54
+	public function can_migrate_from_version($version_array)
55
+	{
56
+		$version_string = $version_array['Core'];
57
+		if (version_compare($version_string, '4.2.0', '<=') && version_compare($version_string, '4.1.0', '>=')) {
58 58
 //			echo "$version_string can be migrated fro";
59
-            return true;
60
-        } elseif ( ! $version_string) {
59
+			return true;
60
+		} elseif ( ! $version_string) {
61 61
 //			echo "no version string provided: $version_string";
62
-            //no version string provided... this must be pre 4.1
63
-            //because since 4.1 we're
64
-            return false;//changed mind. dont want people thinking they should migrate yet because they cant
65
-        } else {
62
+			//no version string provided... this must be pre 4.1
63
+			//because since 4.1 we're
64
+			return false;//changed mind. dont want people thinking they should migrate yet because they cant
65
+		} else {
66 66
 //			echo "$version_string doesnt apply";
67
-            return false;
68
-        }
69
-    }
67
+			return false;
68
+		}
69
+	}
70 70
 
71 71
 
72 72
 
73
-    public function schema_changes_before_migration()
74
-    {
75
-        //relies on 4.1's EEH_Activation::create_table
76
-        require_once(EE_HELPERS . 'EEH_Activation.helper.php');
77
-        $table_name = 'esp_answer';
78
-        $sql = " ANS_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
73
+	public function schema_changes_before_migration()
74
+	{
75
+		//relies on 4.1's EEH_Activation::create_table
76
+		require_once(EE_HELPERS . 'EEH_Activation.helper.php');
77
+		$table_name = 'esp_answer';
78
+		$sql = " ANS_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
79 79
 					REG_ID INT UNSIGNED NOT NULL,
80 80
 					QST_ID INT UNSIGNED NOT NULL,
81 81
 					ANS_value TEXT NOT NULL,
82 82
 					PRIMARY KEY  (ANS_ID)";
83
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
84
-        $table_name = 'esp_attendee_meta';
85
-        $sql = "ATTM_ID INT(10) UNSIGNED NOT	NULL AUTO_INCREMENT,
83
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
84
+		$table_name = 'esp_attendee_meta';
85
+		$sql = "ATTM_ID INT(10) UNSIGNED NOT	NULL AUTO_INCREMENT,
86 86
 						ATT_ID BIGINT(20) UNSIGNED NOT NULL,
87 87
 						ATT_fname VARCHAR(45) NOT NULL,
88 88
 						ATT_lname VARCHAR(45) NOT	NULL,
@@ -98,9 +98,9 @@  discard block
 block discarded – undo
98 98
 								KEY ATT_fname (ATT_fname),
99 99
 								KEY ATT_lname (ATT_lname),
100 100
 								KEY ATT_email (ATT_email)";
101
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
102
-        $table_name = 'esp_country';
103
-        $sql = "CNT_ISO VARCHAR(2) COLLATE utf8_bin NOT NULL,
101
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
102
+		$table_name = 'esp_country';
103
+		$sql = "CNT_ISO VARCHAR(2) COLLATE utf8_bin NOT NULL,
104 104
 					  CNT_ISO3 VARCHAR(3) COLLATE utf8_bin NOT NULL,
105 105
 					  RGN_ID TINYINT(3) UNSIGNED DEFAULT NULL,
106 106
 					  CNT_name VARCHAR(45) COLLATE utf8_bin NOT NULL,
@@ -116,9 +116,9 @@  discard block
 block discarded – undo
116 116
 					  CNT_is_EU TINYINT(1) DEFAULT '0',
117 117
 					  CNT_active TINYINT(1) DEFAULT '0',
118 118
 					  PRIMARY KEY  (CNT_ISO)";
119
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
120
-        $table_name = 'esp_datetime';
121
-        $sql = "DTT_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
119
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
120
+		$table_name = 'esp_datetime';
121
+		$sql = "DTT_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
122 122
 				  EVT_ID BIGINT(20) UNSIGNED NOT NULL,
123 123
 				  DTT_name VARCHAR(255) NOT NULL DEFAULT '',
124 124
 				  DTT_description TEXT NOT NULL,
@@ -133,9 +133,9 @@  discard block
 block discarded – undo
133 133
 						PRIMARY KEY  (DTT_ID),
134 134
 						KEY EVT_ID (EVT_ID),
135 135
 						KEY DTT_is_primary (DTT_is_primary)";
136
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
137
-        $table_name = 'esp_event_meta';
138
-        $sql = "
136
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
137
+		$table_name = 'esp_event_meta';
138
+		$sql = "
139 139
 			EVTM_ID INT NOT NULL AUTO_INCREMENT,
140 140
 			EVT_ID BIGINT(20) UNSIGNED NOT NULL,
141 141
 			EVT_display_desc TINYINT(1) UNSIGNED NOT NULL DEFAULT 1,
@@ -150,31 +150,31 @@  discard block
 block discarded – undo
150 150
 			EVT_external_URL VARCHAR(200) NULL,
151 151
 			EVT_donations TINYINT(1) NULL,
152 152
 			PRIMARY KEY  (EVTM_ID)";
153
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
154
-        $table_name = 'esp_event_question_group';
155
-        $sql = "EQG_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
153
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
154
+		$table_name = 'esp_event_question_group';
155
+		$sql = "EQG_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
156 156
 					EVT_ID BIGINT(20) UNSIGNED NOT NULL,
157 157
 					QSG_ID INT UNSIGNED NOT NULL,
158 158
 					EQG_primary TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
159 159
 					PRIMARY KEY  (EQG_ID)";
160
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
161
-        $table_name = 'esp_event_venue';
162
-        $sql = "EVV_ID INT(11) NOT NULL AUTO_INCREMENT,
160
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
161
+		$table_name = 'esp_event_venue';
162
+		$sql = "EVV_ID INT(11) NOT NULL AUTO_INCREMENT,
163 163
 				EVT_ID BIGINT(20) UNSIGNED NOT NULL,
164 164
 				VNU_ID BIGINT(20) UNSIGNED NOT NULL,
165 165
 				EVV_primary TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
166 166
 				PRIMARY KEY  (EVV_ID)";
167
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
168
-        $table_name = 'esp_extra_meta';
169
-        $sql = "EXM_ID INT(11) NOT NULL AUTO_INCREMENT,
167
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
168
+		$table_name = 'esp_extra_meta';
169
+		$sql = "EXM_ID INT(11) NOT NULL AUTO_INCREMENT,
170 170
 				OBJ_ID INT(11) DEFAULT NULL,
171 171
 				EXM_type VARCHAR(45) DEFAULT NULL,
172 172
 				EXM_key VARCHAR(45) DEFAULT NULL,
173 173
 				EXM_value TEXT,
174 174
 				PRIMARY KEY  (EXM_ID)";
175
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
176
-        $table_name = 'esp_line_item';
177
-        $sql = "LIN_ID INT(11) NOT NULL AUTO_INCREMENT,
175
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
176
+		$table_name = 'esp_line_item';
177
+		$sql = "LIN_ID INT(11) NOT NULL AUTO_INCREMENT,
178 178
 				LIN_code VARCHAR(245) NOT NULL DEFAULT '',
179 179
 				TXN_ID INT(11) DEFAULT NULL,
180 180
 				LIN_name VARCHAR(245) NOT NULL DEFAULT '',
@@ -190,18 +190,18 @@  discard block
 block discarded – undo
190 190
 				OBJ_ID INT(11) DEFAULT NULL,
191 191
 				OBJ_type VARCHAR(45)DEFAULT NULL,
192 192
 				PRIMARY KEY  (LIN_ID)";
193
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
194
-        $table_name = 'esp_message_template';
195
-        $sql = "MTP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
193
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
194
+		$table_name = 'esp_message_template';
195
+		$sql = "MTP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
196 196
 					GRP_ID INT(10) UNSIGNED NOT NULL,
197 197
 					MTP_context VARCHAR(50) NOT NULL,
198 198
 					MTP_template_field VARCHAR(30) NOT NULL,
199 199
 					MTP_content TEXT NOT NULL,
200 200
 					PRIMARY KEY  (MTP_ID),
201 201
 					KEY GRP_ID (GRP_ID)";
202
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
203
-        $table_name = 'esp_message_template_group';
204
-        $sql = "GRP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
202
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
203
+		$table_name = 'esp_message_template_group';
204
+		$sql = "GRP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
205 205
 					EVT_ID BIGINT(20) UNSIGNED DEFAULT NULL,
206 206
 					MTP_user_id INT(10) NOT NULL DEFAULT '1',
207 207
 					MTP_messenger VARCHAR(30) NOT NULL,
@@ -213,9 +213,9 @@  discard block
 block discarded – undo
213 213
 					PRIMARY KEY  (GRP_ID),
214 214
 					KEY EVT_ID (EVT_ID),
215 215
 					KEY MTP_user_id (MTP_user_id)";
216
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
217
-        $table_name = 'esp_payment';
218
-        $sql = "PAY_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
216
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
217
+		$table_name = 'esp_payment';
218
+		$sql = "PAY_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
219 219
 					TXN_ID INT(10) UNSIGNED DEFAULT NULL,
220 220
 					STS_ID VARCHAR(3) COLLATE utf8_bin DEFAULT NULL,
221 221
 					PAY_timestamp DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
@@ -231,9 +231,9 @@  discard block
 block discarded – undo
231 231
 					PRIMARY KEY  (PAY_ID),
232 232
 					KEY TXN_ID (TXN_ID),
233 233
 					KEY PAY_timestamp (PAY_timestamp)";
234
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
235
-        $table_name = "esp_ticket";
236
-        $sql = "TKT_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
234
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
235
+		$table_name = "esp_ticket";
236
+		$sql = "TKT_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
237 237
 					  TTM_ID INT(10) UNSIGNED NOT NULL,
238 238
 					  TKT_name VARCHAR(245) NOT NULL DEFAULT '',
239 239
 					  TKT_description TEXT NOT NULL,
@@ -252,28 +252,28 @@  discard block
 block discarded – undo
252 252
 					  TKT_parent INT(10) UNSIGNED DEFAULT '0',
253 253
 					  TKT_deleted TINYINT(1) NOT NULL DEFAULT '0',
254 254
 					  PRIMARY KEY  (TKT_ID)";
255
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
256
-        $table_name = "esp_ticket_price";
257
-        $sql = "TKP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
255
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
256
+		$table_name = "esp_ticket_price";
257
+		$sql = "TKP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
258 258
 					  TKT_ID INT(10) UNSIGNED NOT NULL,
259 259
 					  PRC_ID INT(10) UNSIGNED NOT NULL,
260 260
 					  PRIMARY KEY  (TKP_ID)";
261
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
262
-        $table_name = "esp_datetime_ticket";
263
-        $sql = "DTK_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
261
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
262
+		$table_name = "esp_datetime_ticket";
263
+		$sql = "DTK_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
264 264
 					  DTT_ID INT(10) UNSIGNED NOT NULL,
265 265
 					  TKT_ID INT(10) UNSIGNED NOT NULL,
266 266
 					  PRIMARY KEY  (DTK_ID)";
267
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
268
-        $table_name = "esp_ticket_template";
269
-        $sql = "TTM_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
267
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
268
+		$table_name = "esp_ticket_template";
269
+		$sql = "TTM_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
270 270
 					  TTM_name VARCHAR(45) NOT NULL,
271 271
 					  TTM_description TEXT,
272 272
 					  TTM_file VARCHAR(45),
273 273
 					  PRIMARY KEY  (TTM_ID)";
274
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
275
-        $table_name = "esp_price";
276
-        $sql = "PRC_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
274
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
275
+		$table_name = "esp_price";
276
+		$sql = "PRC_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
277 277
 					  PRT_ID TINYINT(3) UNSIGNED NOT NULL,
278 278
 					  PRC_amount DECIMAL(10,3) NOT NULL DEFAULT '0.00',
279 279
 					  PRC_name VARCHAR(245) NOT NULL,
@@ -284,9 +284,9 @@  discard block
 block discarded – undo
284 284
 					  PRC_order TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
285 285
 					  PRC_parent INT(10) UNSIGNED DEFAULT 0,
286 286
 					  PRIMARY KEY  (PRC_ID)";
287
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
288
-        $table_name = "esp_price_type";
289
-        $sql = "PRT_ID TINYINT(3) UNSIGNED NOT NULL AUTO_INCREMENT,
287
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
288
+		$table_name = "esp_price_type";
289
+		$sql = "PRT_ID TINYINT(3) UNSIGNED NOT NULL AUTO_INCREMENT,
290 290
 				  PRT_name VARCHAR(45) NOT NULL,
291 291
 				  PBT_ID TINYINT(3) UNSIGNED NOT NULL DEFAULT '1',
292 292
 				  PRT_is_percent TINYINT(1) NOT NULL DEFAULT '0',
@@ -294,9 +294,9 @@  discard block
 block discarded – undo
294 294
 				  PRT_deleted TINYINT(1) NOT NULL DEFAULT '0',
295 295
 				  UNIQUE KEY PRT_name_UNIQUE (PRT_name),
296 296
 				  PRIMARY KEY  (PRT_ID)";
297
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
298
-        $table_name = 'esp_question';
299
-        $sql = 'QST_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
297
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
298
+		$table_name = 'esp_question';
299
+		$sql = 'QST_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
300 300
 					QST_display_text TEXT NOT NULL,
301 301
 					QST_admin_label VARCHAR(255) NOT NULL,
302 302
 					QST_system VARCHAR(25) DEFAULT NULL,
@@ -308,10 +308,10 @@  discard block
 block discarded – undo
308 308
 					QST_wp_user BIGINT UNSIGNED NULL,
309 309
 					QST_deleted TINYINT UNSIGNED NOT NULL DEFAULT 0,
310 310
 					PRIMARY KEY  (QST_ID)';
311
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
312
-        $this->_get_table_manager()->dropIndex('esp_question_group', 'QSG_identifier_UNIQUE');
313
-        $table_name = 'esp_question_group';
314
-        $sql = 'QSG_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
311
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
312
+		$this->_get_table_manager()->dropIndex('esp_question_group', 'QSG_identifier_UNIQUE');
313
+		$table_name = 'esp_question_group';
314
+		$sql = 'QSG_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
315 315
 					QSG_name VARCHAR(255) NOT NULL,
316 316
 					QSG_identifier VARCHAR(100) NOT NULL,
317 317
 					QSG_desc TEXT NULL,
@@ -322,24 +322,24 @@  discard block
 block discarded – undo
322 322
 					QSG_deleted TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
323 323
 					PRIMARY KEY  (QSG_ID),
324 324
 					UNIQUE KEY QSG_identifier_UNIQUE (QSG_identifier ASC)';
325
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
326
-        $table_name = 'esp_question_group_question';
327
-        $sql = "QGQ_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
325
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
326
+		$table_name = 'esp_question_group_question';
327
+		$sql = "QGQ_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
328 328
 					QSG_ID INT UNSIGNED NOT NULL,
329 329
 					QST_ID INT UNSIGNED NOT NULL,
330 330
 					QGQ_order INT UNSIGNED NOT NULL DEFAULT 0,
331 331
 					PRIMARY KEY  (QGQ_ID) ";
332
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
333
-        $table_name = 'esp_question_option';
334
-        $sql = "QSO_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
332
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
333
+		$table_name = 'esp_question_option';
334
+		$sql = "QSO_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
335 335
 					QSO_value VARCHAR(255) NOT NULL,
336 336
 					QSO_desc TEXT NOT NULL,
337 337
 					QST_ID INT UNSIGNED NOT NULL,
338 338
 					QSO_deleted TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
339 339
 					PRIMARY KEY  (QSO_ID)";
340
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
341
-        $table_name = 'esp_registration';
342
-        $sql = "REG_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
340
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
341
+		$table_name = 'esp_registration';
342
+		$sql = "REG_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
343 343
 					  EVT_ID BIGINT(20) UNSIGNED NOT NULL,
344 344
 					  ATT_ID BIGINT(20) UNSIGNED NOT NULL,
345 345
 					  TXN_ID INT(10) UNSIGNED NOT NULL,
@@ -362,25 +362,25 @@  discard block
 block discarded – undo
362 362
 					  KEY STS_ID (STS_ID),
363 363
 					  KEY REG_url_link (REG_url_link),
364 364
 					  KEY REG_code (REG_code)";
365
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
366
-        $table_name = 'esp_checkin';
367
-        $sql = "CHK_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
365
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
366
+		$table_name = 'esp_checkin';
367
+		$sql = "CHK_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
368 368
 					REG_ID INT(10) UNSIGNED NOT NULL,
369 369
 					DTT_ID INT(10) UNSIGNED NOT NULL,
370 370
 					CHK_in TINYINT(1) UNSIGNED NOT NULL DEFAULT 1,
371 371
 					CHK_timestamp DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
372 372
 					PRIMARY KEY  (CHK_ID)";
373
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
374
-        $table_name = 'esp_state';
375
-        $sql = "STA_ID smallint(5) UNSIGNED NOT NULL AUTO_INCREMENT,
373
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
374
+		$table_name = 'esp_state';
375
+		$sql = "STA_ID smallint(5) UNSIGNED NOT NULL AUTO_INCREMENT,
376 376
 					  CNT_ISO VARCHAR(2) COLLATE utf8_bin NOT NULL,
377 377
 					  STA_abbrev VARCHAR(6) COLLATE utf8_bin NOT NULL,
378 378
 					  STA_name VARCHAR(100) COLLATE utf8_bin NOT NULL,
379 379
 					  STA_active TINYINT(1) DEFAULT '1',
380 380
 					  PRIMARY KEY  (STA_ID)";
381
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
382
-        $table_name = 'esp_status';
383
-        $sql = "STS_ID VARCHAR(3) COLLATE utf8_bin NOT NULL,
381
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
382
+		$table_name = 'esp_status';
383
+		$sql = "STS_ID VARCHAR(3) COLLATE utf8_bin NOT NULL,
384 384
 					  STS_code VARCHAR(45) COLLATE utf8_bin NOT NULL,
385 385
 					  STS_type set('event','registration','transaction','payment','email') COLLATE utf8_bin NOT NULL,
386 386
 					  STS_can_edit TINYINT(1) NOT NULL DEFAULT 0,
@@ -388,9 +388,9 @@  discard block
 block discarded – undo
388 388
 					  STS_open TINYINT(1) NOT NULL DEFAULT 1,
389 389
 					  UNIQUE KEY STS_ID_UNIQUE (STS_ID),
390 390
 					  KEY STS_type (STS_type)";
391
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
392
-        $table_name = 'esp_transaction';
393
-        $sql = "TXN_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
391
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
392
+		$table_name = 'esp_transaction';
393
+		$sql = "TXN_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
394 394
 					  TXN_timestamp DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
395 395
 					  TXN_total DECIMAL(10,3) DEFAULT '0.00',
396 396
 					  TXN_paid DECIMAL(10,3) NOT NULL DEFAULT '0.00',
@@ -400,9 +400,9 @@  discard block
 block discarded – undo
400 400
 					  PRIMARY KEY  (TXN_ID),
401 401
 					  KEY TXN_timestamp (TXN_timestamp),
402 402
 					  KEY STS_ID (STS_ID)";
403
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
404
-        $table_name = 'esp_venue_meta';
405
-        $sql = "VNUM_ID INT(11) NOT NULL AUTO_INCREMENT,
403
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
404
+		$table_name = 'esp_venue_meta';
405
+		$sql = "VNUM_ID INT(11) NOT NULL AUTO_INCREMENT,
406 406
 			VNU_ID BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
407 407
 			VNU_address VARCHAR(255) DEFAULT NULL,
408 408
 			VNU_address2 VARCHAR(255) DEFAULT NULL,
@@ -420,38 +420,38 @@  discard block
 block discarded – undo
420 420
 			PRIMARY KEY  (VNUM_ID),
421 421
 			KEY STA_ID (STA_ID),
422 422
 			KEY CNT_ISO (CNT_ISO)";
423
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
424
-        $script_with_defaults = EE_Registry::instance()->load_dms('Core_4_1_0');
425
-        //setting up the DEFAULT stats and countries is also essential for the data migrations to run
426
-        //(because many need to convert old string states to foreign keys into the states table)
427
-        $script_with_defaults->insert_default_states();
428
-        $script_with_defaults->insert_default_countries();
429
-        //setting up DEFAULT prices, price types, and tickets is also essential for the price migrations
430
-        $script_with_defaults->insert_default_price_types();
431
-        $script_with_defaults->insert_default_prices();
432
-        $script_with_defaults->insert_default_tickets();
433
-        //setting up the config wp option pretty well counts as a 'schema change', or at least should happen ehre
434
-        EE_Config::instance()->update_espresso_config(false, true);
435
-        return true;
436
-    }
423
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
424
+		$script_with_defaults = EE_Registry::instance()->load_dms('Core_4_1_0');
425
+		//setting up the DEFAULT stats and countries is also essential for the data migrations to run
426
+		//(because many need to convert old string states to foreign keys into the states table)
427
+		$script_with_defaults->insert_default_states();
428
+		$script_with_defaults->insert_default_countries();
429
+		//setting up DEFAULT prices, price types, and tickets is also essential for the price migrations
430
+		$script_with_defaults->insert_default_price_types();
431
+		$script_with_defaults->insert_default_prices();
432
+		$script_with_defaults->insert_default_tickets();
433
+		//setting up the config wp option pretty well counts as a 'schema change', or at least should happen ehre
434
+		EE_Config::instance()->update_espresso_config(false, true);
435
+		return true;
436
+	}
437 437
 
438 438
 
439 439
 
440
-    /**
441
-     * We COULD clean up the esp_question.QST_order field here. We'll leave it for now
442
-     *
443
-     * @return boolean
444
-     */
445
-    public function schema_changes_after_migration()
446
-    {
447
-        return true;
448
-    }
440
+	/**
441
+	 * We COULD clean up the esp_question.QST_order field here. We'll leave it for now
442
+	 *
443
+	 * @return boolean
444
+	 */
445
+	public function schema_changes_after_migration()
446
+	{
447
+		return true;
448
+	}
449 449
 
450 450
 
451 451
 
452
-    public function migration_page_hooks()
453
-    {
454
-    }
452
+	public function migration_page_hooks()
453
+	{
454
+	}
455 455
 }
456 456
 
457 457
 
Please login to merge, or discard this patch.
core/data_migration_scripts/EE_DMS_Core_4_3_0.dms.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 //unfortunately, this needs to be done upon INCLUSION of this file,
12 12
 //instead of construction, because it only gets constructed on first page load
13 13
 //(all other times it gets resurrected from a wordpress option)
14
-$stages = glob(EE_CORE . 'data_migration_scripts/4_3_0_stages/*');
14
+$stages = glob(EE_CORE.'data_migration_scripts/4_3_0_stages/*');
15 15
 $class_to_filepath = array();
16 16
 if ( ! empty($stages)) {
17 17
     foreach ($stages as $filepath) {
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
         } elseif ( ! $version_string) {
61 61
 //			echo "no version string provided: $version_string";
62 62
             //no version string provided... this must be pre 4.2
63
-            return false;//changed mind. dont want people thinking they should migrate yet because they cant
63
+            return false; //changed mind. dont want people thinking they should migrate yet because they cant
64 64
         } else {
65 65
 //			echo "$version_string doesnt apply";
66 66
             return false;
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
     public function schema_changes_before_migration()
80 80
     {
81 81
         //relies on 4.1's EEH_Activation::create_table
82
-        require_once(EE_HELPERS . 'EEH_Activation.helper.php');
82
+        require_once(EE_HELPERS.'EEH_Activation.helper.php');
83 83
         $table_name = 'esp_answer';
84 84
         $sql = " ANS_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
85 85
 					REG_ID INT UNSIGNED NOT NULL,
@@ -482,9 +482,9 @@  discard block
 block discarded – undo
482 482
     public function insert_default_tickets()
483 483
     {
484 484
         global $wpdb;
485
-        $ticket_table = $wpdb->prefix . "esp_ticket";
485
+        $ticket_table = $wpdb->prefix."esp_ticket";
486 486
         if ($this->_get_table_analysis()->tableExists($ticket_table)) {
487
-            $SQL = 'SELECT COUNT(TKT_ID) FROM ' . $ticket_table;
487
+            $SQL = 'SELECT COUNT(TKT_ID) FROM '.$ticket_table;
488 488
             $tickets_exist = $wpdb->get_var($SQL);
489 489
             if ( ! $tickets_exist) {
490 490
                 $SQL = "INSERT INTO $ticket_table
@@ -496,9 +496,9 @@  discard block
 block discarded – undo
496 496
                 $wpdb->query($SQL);
497 497
             }
498 498
         }
499
-        $ticket_price_table = $wpdb->prefix . "esp_ticket_price";
499
+        $ticket_price_table = $wpdb->prefix."esp_ticket_price";
500 500
         if ($this->_get_table_analysis()->tableExists($ticket_price_table)) {
501
-            $SQL = 'SELECT COUNT(TKP_ID) FROM ' . $ticket_price_table;
501
+            $SQL = 'SELECT COUNT(TKP_ID) FROM '.$ticket_price_table;
502 502
             $ticket_prc_exist = $wpdb->get_var($SQL);
503 503
             if ( ! $ticket_prc_exist) {
504 504
                 $SQL = "INSERT INTO $ticket_price_table
Please login to merge, or discard this patch.
Indentation   +193 added lines, -193 removed lines patch added patch discarded remove patch
@@ -14,11 +14,11 @@  discard block
 block discarded – undo
14 14
 $stages = glob(EE_CORE . 'data_migration_scripts/4_3_0_stages/*');
15 15
 $class_to_filepath = array();
16 16
 if ( ! empty($stages)) {
17
-    foreach ($stages as $filepath) {
18
-        $matches = array();
19
-        preg_match('~4_3_0_stages/(.*).dmsstage.php~', $filepath, $matches);
20
-        $class_to_filepath[$matches[1]] = $filepath;
21
-    }
17
+	foreach ($stages as $filepath) {
18
+		$matches = array();
19
+		preg_match('~4_3_0_stages/(.*).dmsstage.php~', $filepath, $matches);
20
+		$class_to_filepath[$matches[1]] = $filepath;
21
+	}
22 22
 }
23 23
 //give addons a chance to autoload their stages too
24 24
 $class_to_filepath = apply_filters('FHEE__EE_DMS_4_3_0__autoloaded_stages', $class_to_filepath);
@@ -31,56 +31,56 @@  discard block
 block discarded – undo
31 31
 
32 32
 
33 33
 
34
-    /**
35
-     * EE_DMS_Core_4_3_0 constructor.
36
-     *
37
-     * @param TableManager  $table_manager
38
-     * @param TableAnalysis $table_analysis
39
-     */
40
-    public function __construct(TableManager $table_manager = null, TableAnalysis $table_analysis = null)
41
-    {
42
-        $this->_pretty_name = __("Data Update to Event Espresso 4.3.0", "event_espresso");
43
-        $this->_priority = 10;
44
-        $this->_migration_stages = array(
45
-            new EE_DMS_4_3_0_question_option_order(),
46
-            new EE_DMS_4_3_0_event_message_templates(),
47
-        );
48
-        parent::__construct($table_manager, $table_analysis);
49
-    }
34
+	/**
35
+	 * EE_DMS_Core_4_3_0 constructor.
36
+	 *
37
+	 * @param TableManager  $table_manager
38
+	 * @param TableAnalysis $table_analysis
39
+	 */
40
+	public function __construct(TableManager $table_manager = null, TableAnalysis $table_analysis = null)
41
+	{
42
+		$this->_pretty_name = __("Data Update to Event Espresso 4.3.0", "event_espresso");
43
+		$this->_priority = 10;
44
+		$this->_migration_stages = array(
45
+			new EE_DMS_4_3_0_question_option_order(),
46
+			new EE_DMS_4_3_0_event_message_templates(),
47
+		);
48
+		parent::__construct($table_manager, $table_analysis);
49
+	}
50 50
 
51 51
 
52 52
 
53
-    public function can_migrate_from_version($version_array)
54
-    {
55
-        $version_string = $version_array['Core'];
56
-        if (version_compare($version_string, '4.3.0', '<=') && version_compare($version_string, '4.2.0', '>=')) {
53
+	public function can_migrate_from_version($version_array)
54
+	{
55
+		$version_string = $version_array['Core'];
56
+		if (version_compare($version_string, '4.3.0', '<=') && version_compare($version_string, '4.2.0', '>=')) {
57 57
 //			echo "$version_string can be migrated fro";
58
-            return true;
59
-        } elseif ( ! $version_string) {
58
+			return true;
59
+		} elseif ( ! $version_string) {
60 60
 //			echo "no version string provided: $version_string";
61
-            //no version string provided... this must be pre 4.2
62
-            return false;//changed mind. dont want people thinking they should migrate yet because they cant
63
-        } else {
61
+			//no version string provided... this must be pre 4.2
62
+			return false;//changed mind. dont want people thinking they should migrate yet because they cant
63
+		} else {
64 64
 //			echo "$version_string doesnt apply";
65
-            return false;
66
-        }
67
-    }
65
+			return false;
66
+		}
67
+	}
68 68
 
69 69
 
70 70
 
71
-    public function schema_changes_before_migration()
72
-    {
73
-        //relies on 4.1's EEH_Activation::create_table
74
-        require_once(EE_HELPERS . 'EEH_Activation.helper.php');
75
-        $table_name = 'esp_answer';
76
-        $sql = " ANS_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
71
+	public function schema_changes_before_migration()
72
+	{
73
+		//relies on 4.1's EEH_Activation::create_table
74
+		require_once(EE_HELPERS . 'EEH_Activation.helper.php');
75
+		$table_name = 'esp_answer';
76
+		$sql = " ANS_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
77 77
 					REG_ID INT UNSIGNED NOT NULL,
78 78
 					QST_ID INT UNSIGNED NOT NULL,
79 79
 					ANS_value TEXT NOT NULL,
80 80
 					PRIMARY KEY  (ANS_ID)";
81
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
82
-        $table_name = 'esp_attendee_meta';
83
-        $sql = "ATTM_ID INT(10) UNSIGNED NOT	NULL AUTO_INCREMENT,
81
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
82
+		$table_name = 'esp_attendee_meta';
83
+		$sql = "ATTM_ID INT(10) UNSIGNED NOT	NULL AUTO_INCREMENT,
84 84
 						ATT_ID BIGINT(20) UNSIGNED NOT NULL,
85 85
 						ATT_fname VARCHAR(45) NOT NULL,
86 86
 						ATT_lname VARCHAR(45) NOT	NULL,
@@ -96,9 +96,9 @@  discard block
 block discarded – undo
96 96
 								KEY ATT_fname (ATT_fname),
97 97
 								KEY ATT_lname (ATT_lname),
98 98
 								KEY ATT_email (ATT_email)";
99
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
100
-        $table_name = 'esp_country';
101
-        $sql = "CNT_ISO VARCHAR(2) COLLATE utf8_bin NOT NULL,
99
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
100
+		$table_name = 'esp_country';
101
+		$sql = "CNT_ISO VARCHAR(2) COLLATE utf8_bin NOT NULL,
102 102
 					  CNT_ISO3 VARCHAR(3) COLLATE utf8_bin NOT NULL,
103 103
 					  RGN_ID TINYINT(3) UNSIGNED DEFAULT NULL,
104 104
 					  CNT_name VARCHAR(45) COLLATE utf8_bin NOT NULL,
@@ -114,9 +114,9 @@  discard block
 block discarded – undo
114 114
 					  CNT_is_EU TINYINT(1) DEFAULT '0',
115 115
 					  CNT_active TINYINT(1) DEFAULT '0',
116 116
 					  PRIMARY KEY  (CNT_ISO)";
117
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
118
-        $table_name = 'esp_datetime';
119
-        $sql = "DTT_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
117
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
118
+		$table_name = 'esp_datetime';
119
+		$sql = "DTT_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
120 120
 				  EVT_ID BIGINT(20) UNSIGNED NOT NULL,
121 121
 				  DTT_name VARCHAR(255) NOT NULL DEFAULT '',
122 122
 				  DTT_description TEXT NOT NULL,
@@ -131,9 +131,9 @@  discard block
 block discarded – undo
131 131
 						PRIMARY KEY  (DTT_ID),
132 132
 						KEY EVT_ID (EVT_ID),
133 133
 						KEY DTT_is_primary (DTT_is_primary)";
134
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
135
-        $table_name = 'esp_event_meta';
136
-        $sql = "
134
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
135
+		$table_name = 'esp_event_meta';
136
+		$sql = "
137 137
 			EVTM_ID INT NOT NULL AUTO_INCREMENT,
138 138
 			EVT_ID BIGINT(20) UNSIGNED NOT NULL,
139 139
 			EVT_display_desc TINYINT(1) UNSIGNED NOT NULL DEFAULT 1,
@@ -148,31 +148,31 @@  discard block
 block discarded – undo
148 148
 			EVT_external_URL VARCHAR(200) NULL,
149 149
 			EVT_donations TINYINT(1) NULL,
150 150
 			PRIMARY KEY  (EVTM_ID)";
151
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
152
-        $table_name = 'esp_event_question_group';
153
-        $sql = "EQG_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
151
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
152
+		$table_name = 'esp_event_question_group';
153
+		$sql = "EQG_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
154 154
 					EVT_ID BIGINT(20) UNSIGNED NOT NULL,
155 155
 					QSG_ID INT UNSIGNED NOT NULL,
156 156
 					EQG_primary TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
157 157
 					PRIMARY KEY  (EQG_ID)";
158
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
159
-        $table_name = 'esp_event_venue';
160
-        $sql = "EVV_ID INT(11) NOT NULL AUTO_INCREMENT,
158
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
159
+		$table_name = 'esp_event_venue';
160
+		$sql = "EVV_ID INT(11) NOT NULL AUTO_INCREMENT,
161 161
 				EVT_ID BIGINT(20) UNSIGNED NOT NULL,
162 162
 				VNU_ID BIGINT(20) UNSIGNED NOT NULL,
163 163
 				EVV_primary TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
164 164
 				PRIMARY KEY  (EVV_ID)";
165
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
166
-        $table_name = 'esp_extra_meta';
167
-        $sql = "EXM_ID INT(11) NOT NULL AUTO_INCREMENT,
165
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
166
+		$table_name = 'esp_extra_meta';
167
+		$sql = "EXM_ID INT(11) NOT NULL AUTO_INCREMENT,
168 168
 				OBJ_ID INT(11) DEFAULT NULL,
169 169
 				EXM_type VARCHAR(45) DEFAULT NULL,
170 170
 				EXM_key VARCHAR(45) DEFAULT NULL,
171 171
 				EXM_value TEXT,
172 172
 				PRIMARY KEY  (EXM_ID)";
173
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
174
-        $table_name = 'esp_line_item';
175
-        $sql = "LIN_ID INT(11) NOT NULL AUTO_INCREMENT,
173
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
174
+		$table_name = 'esp_line_item';
175
+		$sql = "LIN_ID INT(11) NOT NULL AUTO_INCREMENT,
176 176
 				LIN_code VARCHAR(245) NOT NULL DEFAULT '',
177 177
 				TXN_ID INT(11) DEFAULT NULL,
178 178
 				LIN_name VARCHAR(245) NOT NULL DEFAULT '',
@@ -188,19 +188,19 @@  discard block
 block discarded – undo
188 188
 				OBJ_ID INT(11) DEFAULT NULL,
189 189
 				OBJ_type VARCHAR(45)DEFAULT NULL,
190 190
 				PRIMARY KEY  (LIN_ID)";
191
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
192
-        $table_name = 'esp_message_template';
193
-        $sql = "MTP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
191
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
192
+		$table_name = 'esp_message_template';
193
+		$sql = "MTP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
194 194
 					GRP_ID INT(10) UNSIGNED NOT NULL,
195 195
 					MTP_context VARCHAR(50) NOT NULL,
196 196
 					MTP_template_field VARCHAR(30) NOT NULL,
197 197
 					MTP_content TEXT NOT NULL,
198 198
 					PRIMARY KEY  (MTP_ID),
199 199
 					KEY GRP_ID (GRP_ID)";
200
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
201
-        $this->_get_table_manager()->dropIndex('esp_message_template_group', 'EVT_ID');
202
-        $table_name = 'esp_message_template_group';
203
-        $sql = "GRP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
200
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
201
+		$this->_get_table_manager()->dropIndex('esp_message_template_group', 'EVT_ID');
202
+		$table_name = 'esp_message_template_group';
203
+		$sql = "GRP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
204 204
 					MTP_user_id INT(10) NOT NULL DEFAULT '1',
205 205
 					MTP_name VARCHAR(245) NOT NULL DEFAULT '',
206 206
 					MTP_description VARCHAR(245) NOT NULL DEFAULT '',
@@ -212,17 +212,17 @@  discard block
 block discarded – undo
212 212
 					MTP_is_active TINYINT(1) NOT NULL DEFAULT '1',
213 213
 					PRIMARY KEY  (GRP_ID),
214 214
 					KEY MTP_user_id (MTP_user_id)";
215
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
216
-        $table_name = 'esp_event_message_template';
217
-        $sql = "EMT_ID BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
215
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
216
+		$table_name = 'esp_event_message_template';
217
+		$sql = "EMT_ID BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
218 218
 					EVT_ID BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
219 219
 					GRP_ID INT(10) UNSIGNED NOT NULL DEFAULT 0,
220 220
 					PRIMARY KEY  (EMT_ID),
221 221
 					KEY EVT_ID (EVT_ID),
222 222
 					KEY GRP_ID (GRP_ID)";
223
-        $this->_table_is_new_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
224
-        $table_name = 'esp_payment';
225
-        $sql = "PAY_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
223
+		$this->_table_is_new_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
224
+		$table_name = 'esp_payment';
225
+		$sql = "PAY_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
226 226
 					TXN_ID INT(10) UNSIGNED DEFAULT NULL,
227 227
 					STS_ID VARCHAR(3) COLLATE utf8_bin DEFAULT NULL,
228 228
 					PAY_timestamp DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
@@ -238,9 +238,9 @@  discard block
 block discarded – undo
238 238
 					PRIMARY KEY  (PAY_ID),
239 239
 					KEY TXN_ID (TXN_ID),
240 240
 					KEY PAY_timestamp (PAY_timestamp)";
241
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
242
-        $table_name = "esp_ticket";
243
-        $sql = "TKT_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
241
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
242
+		$table_name = "esp_ticket";
243
+		$sql = "TKT_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
244 244
 					  TTM_ID INT(10) UNSIGNED NOT NULL,
245 245
 					  TKT_name VARCHAR(245) NOT NULL DEFAULT '',
246 246
 					  TKT_description TEXT NOT NULL,
@@ -260,28 +260,28 @@  discard block
 block discarded – undo
260 260
 					  TKT_parent INT(10) UNSIGNED DEFAULT '0',
261 261
 					  TKT_deleted TINYINT(1) NOT NULL DEFAULT '0',
262 262
 					  PRIMARY KEY  (TKT_ID)";
263
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
264
-        $table_name = "esp_ticket_price";
265
-        $sql = "TKP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
263
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
264
+		$table_name = "esp_ticket_price";
265
+		$sql = "TKP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
266 266
 					  TKT_ID INT(10) UNSIGNED NOT NULL,
267 267
 					  PRC_ID INT(10) UNSIGNED NOT NULL,
268 268
 					  PRIMARY KEY  (TKP_ID)";
269
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
270
-        $table_name = "esp_datetime_ticket";
271
-        $sql = "DTK_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
269
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
270
+		$table_name = "esp_datetime_ticket";
271
+		$sql = "DTK_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
272 272
 					  DTT_ID INT(10) UNSIGNED NOT NULL,
273 273
 					  TKT_ID INT(10) UNSIGNED NOT NULL,
274 274
 					  PRIMARY KEY  (DTK_ID)";
275
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
276
-        $table_name = "esp_ticket_template";
277
-        $sql = "TTM_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
275
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
276
+		$table_name = "esp_ticket_template";
277
+		$sql = "TTM_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
278 278
 					  TTM_name VARCHAR(45) NOT NULL,
279 279
 					  TTM_description TEXT,
280 280
 					  TTM_file VARCHAR(45),
281 281
 					  PRIMARY KEY  (TTM_ID)";
282
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
283
-        $table_name = "esp_price";
284
-        $sql = "PRC_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
282
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
283
+		$table_name = "esp_price";
284
+		$sql = "PRC_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
285 285
 					  PRT_ID TINYINT(3) UNSIGNED NOT NULL,
286 286
 					  PRC_amount DECIMAL(10,3) NOT NULL DEFAULT '0.00',
287 287
 					  PRC_name VARCHAR(245) NOT NULL,
@@ -292,9 +292,9 @@  discard block
 block discarded – undo
292 292
 					  PRC_order TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
293 293
 					  PRC_parent INT(10) UNSIGNED DEFAULT 0,
294 294
 					  PRIMARY KEY  (PRC_ID)";
295
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
296
-        $table_name = "esp_price_type";
297
-        $sql = "PRT_ID TINYINT(3) UNSIGNED NOT NULL AUTO_INCREMENT,
295
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
296
+		$table_name = "esp_price_type";
297
+		$sql = "PRT_ID TINYINT(3) UNSIGNED NOT NULL AUTO_INCREMENT,
298 298
 				  PRT_name VARCHAR(45) NOT NULL,
299 299
 				  PBT_ID TINYINT(3) UNSIGNED NOT NULL DEFAULT '1',
300 300
 				  PRT_is_percent TINYINT(1) NOT NULL DEFAULT '0',
@@ -302,9 +302,9 @@  discard block
 block discarded – undo
302 302
 				  PRT_deleted TINYINT(1) NOT NULL DEFAULT '0',
303 303
 				  UNIQUE KEY PRT_name_UNIQUE (PRT_name),
304 304
 				  PRIMARY KEY  (PRT_ID)";
305
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
306
-        $table_name = 'esp_question';
307
-        $sql = 'QST_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
305
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
306
+		$table_name = 'esp_question';
307
+		$sql = 'QST_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
308 308
 					QST_display_text TEXT NOT NULL,
309 309
 					QST_admin_label VARCHAR(255) NOT NULL,
310 310
 					QST_system VARCHAR(25) DEFAULT NULL,
@@ -316,10 +316,10 @@  discard block
 block discarded – undo
316 316
 					QST_wp_user BIGINT UNSIGNED NULL,
317 317
 					QST_deleted TINYINT UNSIGNED NOT NULL DEFAULT 0,
318 318
 					PRIMARY KEY  (QST_ID)';
319
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
320
-        $this->_get_table_manager()->dropIndex('esp_question_group', 'QSG_identifier_UNIQUE');
321
-        $table_name = 'esp_question_group';
322
-        $sql = 'QSG_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
319
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
320
+		$this->_get_table_manager()->dropIndex('esp_question_group', 'QSG_identifier_UNIQUE');
321
+		$table_name = 'esp_question_group';
322
+		$sql = 'QSG_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
323 323
 					QSG_name VARCHAR(255) NOT NULL,
324 324
 					QSG_identifier VARCHAR(100) NOT NULL,
325 325
 					QSG_desc TEXT NULL,
@@ -330,25 +330,25 @@  discard block
 block discarded – undo
330 330
 					QSG_deleted TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
331 331
 					PRIMARY KEY  (QSG_ID),
332 332
 					UNIQUE KEY QSG_identifier_UNIQUE (QSG_identifier ASC)';
333
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
334
-        $table_name = 'esp_question_group_question';
335
-        $sql = "QGQ_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
333
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
334
+		$table_name = 'esp_question_group_question';
335
+		$sql = "QGQ_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
336 336
 					QSG_ID INT UNSIGNED NOT NULL,
337 337
 					QST_ID INT UNSIGNED NOT NULL,
338 338
 					QGQ_order INT UNSIGNED NOT NULL DEFAULT 0,
339 339
 					PRIMARY KEY  (QGQ_ID) ";
340
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
341
-        $table_name = 'esp_question_option';
342
-        $sql = "QSO_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
340
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
341
+		$table_name = 'esp_question_option';
342
+		$sql = "QSO_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
343 343
 					QSO_value VARCHAR(255) NOT NULL,
344 344
 					QSO_desc TEXT NOT NULL,
345 345
 					QST_ID INT UNSIGNED NOT NULL,
346 346
 					QSO_order INT UNSIGNED NOT NULL DEFAULT 0,
347 347
 					QSO_deleted TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
348 348
 					PRIMARY KEY  (QSO_ID)";
349
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
350
-        $table_name = 'esp_registration';
351
-        $sql = "REG_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
349
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
350
+		$table_name = 'esp_registration';
351
+		$sql = "REG_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
352 352
 					  EVT_ID BIGINT(20) UNSIGNED NOT NULL,
353 353
 					  ATT_ID BIGINT(20) UNSIGNED NOT NULL,
354 354
 					  TXN_ID INT(10) UNSIGNED NOT NULL,
@@ -371,25 +371,25 @@  discard block
 block discarded – undo
371 371
 					  KEY STS_ID (STS_ID),
372 372
 					  KEY REG_url_link (REG_url_link),
373 373
 					  KEY REG_code (REG_code)";
374
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
375
-        $table_name = 'esp_checkin';
376
-        $sql = "CHK_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
374
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
375
+		$table_name = 'esp_checkin';
376
+		$sql = "CHK_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
377 377
 					REG_ID INT(10) UNSIGNED NOT NULL,
378 378
 					DTT_ID INT(10) UNSIGNED NOT NULL,
379 379
 					CHK_in TINYINT(1) UNSIGNED NOT NULL DEFAULT 1,
380 380
 					CHK_timestamp DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
381 381
 					PRIMARY KEY  (CHK_ID)";
382
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
383
-        $table_name = 'esp_state';
384
-        $sql = "STA_ID smallint(5) UNSIGNED NOT NULL AUTO_INCREMENT,
382
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
383
+		$table_name = 'esp_state';
384
+		$sql = "STA_ID smallint(5) UNSIGNED NOT NULL AUTO_INCREMENT,
385 385
 					  CNT_ISO VARCHAR(2) COLLATE utf8_bin NOT NULL,
386 386
 					  STA_abbrev VARCHAR(6) COLLATE utf8_bin NOT NULL,
387 387
 					  STA_name VARCHAR(100) COLLATE utf8_bin NOT NULL,
388 388
 					  STA_active TINYINT(1) DEFAULT '1',
389 389
 					  PRIMARY KEY  (STA_ID)";
390
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
391
-        $table_name = 'esp_status';
392
-        $sql = "STS_ID VARCHAR(3) COLLATE utf8_bin NOT NULL,
390
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
391
+		$table_name = 'esp_status';
392
+		$sql = "STS_ID VARCHAR(3) COLLATE utf8_bin NOT NULL,
393 393
 					  STS_code VARCHAR(45) COLLATE utf8_bin NOT NULL,
394 394
 					  STS_type set('event','registration','transaction','payment','email') COLLATE utf8_bin NOT NULL,
395 395
 					  STS_can_edit TINYINT(1) NOT NULL DEFAULT 0,
@@ -397,9 +397,9 @@  discard block
 block discarded – undo
397 397
 					  STS_open TINYINT(1) NOT NULL DEFAULT 1,
398 398
 					  UNIQUE KEY STS_ID_UNIQUE (STS_ID),
399 399
 					  KEY STS_type (STS_type)";
400
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
401
-        $table_name = 'esp_transaction';
402
-        $sql = "TXN_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
400
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
401
+		$table_name = 'esp_transaction';
402
+		$sql = "TXN_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
403 403
 					  TXN_timestamp DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
404 404
 					  TXN_total DECIMAL(10,3) DEFAULT '0.00',
405 405
 					  TXN_paid DECIMAL(10,3) NOT NULL DEFAULT '0.00',
@@ -409,9 +409,9 @@  discard block
 block discarded – undo
409 409
 					  PRIMARY KEY  (TXN_ID),
410 410
 					  KEY TXN_timestamp (TXN_timestamp),
411 411
 					  KEY STS_ID (STS_ID)";
412
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
413
-        $table_name = 'esp_venue_meta';
414
-        $sql = "VNUM_ID INT(11) NOT NULL AUTO_INCREMENT,
412
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
413
+		$table_name = 'esp_venue_meta';
414
+		$sql = "VNUM_ID INT(11) NOT NULL AUTO_INCREMENT,
415 415
 			VNU_ID BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
416 416
 			VNU_address VARCHAR(255) DEFAULT NULL,
417 417
 			VNU_address2 VARCHAR(255) DEFAULT NULL,
@@ -429,79 +429,79 @@  discard block
 block discarded – undo
429 429
 			PRIMARY KEY  (VNUM_ID),
430 430
 			KEY STA_ID (STA_ID),
431 431
 			KEY CNT_ISO (CNT_ISO)";
432
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
433
-        $script_with_defaults = EE_Registry::instance()->load_dms('Core_4_1_0');
434
-        //setting up the DEFAULT stats and countries is also essential for the data migrations to run
435
-        //(because many need to convert old string states to foreign keys into the states table)
436
-        $script_with_defaults->insert_default_states();
437
-        $script_with_defaults->insert_default_countries();
438
-        //setting up DEFAULT prices, price types, and tickets is also essential for the price migrations
439
-        $script_with_defaults->insert_default_price_types();
440
-        $script_with_defaults->insert_default_prices();
441
-        //but the schema on the tickets table has changed since 4.1, so use our DEFAULT ticket method instead of 4.1's
442
-        $this->insert_default_tickets();
443
-        //setting up the config wp option pretty well counts as a 'schema change', or at least should happen ehre
444
-        EE_Config::instance()->update_espresso_config(false, true);
445
-        return true;
446
-    }
447
-
448
-
449
-
450
-    /**
451
-     * @return boolean
452
-     */
453
-    public function schema_changes_after_migration()
454
-    {
455
-        return true;
456
-    }
457
-
458
-
459
-
460
-    public function migration_page_hooks()
461
-    {
462
-    }
463
-
464
-
465
-
466
-    /**
467
-     * insert DEFAULT ticket
468
-     * Almost identical to EE_DMS_Core_4_1_0::insert_default_tickets, except is aware of the TKT_required field
469
-     *
470
-     * @access public
471
-     * @static
472
-     * @return void
473
-     */
474
-    public function insert_default_tickets()
475
-    {
476
-        global $wpdb;
477
-        $ticket_table = $wpdb->prefix . "esp_ticket";
478
-        if ($this->_get_table_analysis()->tableExists($ticket_table)) {
479
-            $SQL = 'SELECT COUNT(TKT_ID) FROM ' . $ticket_table;
480
-            $tickets_exist = $wpdb->get_var($SQL);
481
-            if ( ! $tickets_exist) {
482
-                $SQL = "INSERT INTO $ticket_table
432
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
433
+		$script_with_defaults = EE_Registry::instance()->load_dms('Core_4_1_0');
434
+		//setting up the DEFAULT stats and countries is also essential for the data migrations to run
435
+		//(because many need to convert old string states to foreign keys into the states table)
436
+		$script_with_defaults->insert_default_states();
437
+		$script_with_defaults->insert_default_countries();
438
+		//setting up DEFAULT prices, price types, and tickets is also essential for the price migrations
439
+		$script_with_defaults->insert_default_price_types();
440
+		$script_with_defaults->insert_default_prices();
441
+		//but the schema on the tickets table has changed since 4.1, so use our DEFAULT ticket method instead of 4.1's
442
+		$this->insert_default_tickets();
443
+		//setting up the config wp option pretty well counts as a 'schema change', or at least should happen ehre
444
+		EE_Config::instance()->update_espresso_config(false, true);
445
+		return true;
446
+	}
447
+
448
+
449
+
450
+	/**
451
+	 * @return boolean
452
+	 */
453
+	public function schema_changes_after_migration()
454
+	{
455
+		return true;
456
+	}
457
+
458
+
459
+
460
+	public function migration_page_hooks()
461
+	{
462
+	}
463
+
464
+
465
+
466
+	/**
467
+	 * insert DEFAULT ticket
468
+	 * Almost identical to EE_DMS_Core_4_1_0::insert_default_tickets, except is aware of the TKT_required field
469
+	 *
470
+	 * @access public
471
+	 * @static
472
+	 * @return void
473
+	 */
474
+	public function insert_default_tickets()
475
+	{
476
+		global $wpdb;
477
+		$ticket_table = $wpdb->prefix . "esp_ticket";
478
+		if ($this->_get_table_analysis()->tableExists($ticket_table)) {
479
+			$SQL = 'SELECT COUNT(TKT_ID) FROM ' . $ticket_table;
480
+			$tickets_exist = $wpdb->get_var($SQL);
481
+			if ( ! $tickets_exist) {
482
+				$SQL = "INSERT INTO $ticket_table
483 483
 					( TKT_ID, TTM_ID, TKT_name, TKT_description, TKT_qty, TKT_sold, TKT_uses, TKT_required, TKT_min, TKT_max, TKT_price, TKT_start_date, TKT_end_date, TKT_taxable, TKT_order, TKT_row, TKT_is_default, TKT_parent, TKT_deleted ) VALUES
484 484
 					( 1, 0, '"
485
-                       . __("Free Ticket", "event_espresso")
486
-                       . "', '', 100, 0, -1, 0, 0, -1, 0.00, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, 0, 1, 1, 0, 0);";
487
-                $SQL = apply_filters('FHEE__EE_DMS_4_1_0__insert_default_tickets__SQL', $SQL);
488
-                $wpdb->query($SQL);
489
-            }
490
-        }
491
-        $ticket_price_table = $wpdb->prefix . "esp_ticket_price";
492
-        if ($this->_get_table_analysis()->tableExists($ticket_price_table)) {
493
-            $SQL = 'SELECT COUNT(TKP_ID) FROM ' . $ticket_price_table;
494
-            $ticket_prc_exist = $wpdb->get_var($SQL);
495
-            if ( ! $ticket_prc_exist) {
496
-                $SQL = "INSERT INTO $ticket_price_table
485
+					   . __("Free Ticket", "event_espresso")
486
+					   . "', '', 100, 0, -1, 0, 0, -1, 0.00, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, 0, 1, 1, 0, 0);";
487
+				$SQL = apply_filters('FHEE__EE_DMS_4_1_0__insert_default_tickets__SQL', $SQL);
488
+				$wpdb->query($SQL);
489
+			}
490
+		}
491
+		$ticket_price_table = $wpdb->prefix . "esp_ticket_price";
492
+		if ($this->_get_table_analysis()->tableExists($ticket_price_table)) {
493
+			$SQL = 'SELECT COUNT(TKP_ID) FROM ' . $ticket_price_table;
494
+			$ticket_prc_exist = $wpdb->get_var($SQL);
495
+			if ( ! $ticket_prc_exist) {
496
+				$SQL = "INSERT INTO $ticket_price_table
497 497
 				( TKP_ID, TKT_ID, PRC_ID ) VALUES
498 498
 				( 1, 1, 1 )
499 499
 				";
500
-                $SQL = apply_filters('FHEE__EE_DMS_4_1_0__insert_default_tickets__SQL__ticket_price', $SQL);
501
-                $wpdb->query($SQL);
502
-            }
503
-        }
504
-    }
500
+				$SQL = apply_filters('FHEE__EE_DMS_4_1_0__insert_default_tickets__SQL__ticket_price', $SQL);
501
+				$wpdb->query($SQL);
502
+			}
503
+		}
504
+	}
505 505
 
506 506
 }
507 507
 
Please login to merge, or discard this patch.
core/data_migration_scripts/EE_DMS_Core_4_6_0.dms.php 2 patches
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 //unfortunately, this needs to be done upon INCLUSION of this file,
12 12
 //instead of construction, because it only gets constructed on first page load
13 13
 //(all other times it gets resurrected from a wordpress option)
14
-$stages = glob(EE_CORE . 'data_migration_scripts/4_6_0_stages/*');
14
+$stages = glob(EE_CORE.'data_migration_scripts/4_6_0_stages/*');
15 15
 $class_to_filepath = array();
16 16
 foreach ($stages as $filepath) {
17 17
     $matches = array();
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
         } elseif ( ! $version_string) {
75 75
 //			echo "no version string provided: $version_string";
76 76
             //no version string provided... this must be pre 4.3
77
-            return false;//changed mind. dont want people thinking they should migrate yet because they cant
77
+            return false; //changed mind. dont want people thinking they should migrate yet because they cant
78 78
         } else {
79 79
 //			echo "$version_string doesnt apply";
80 80
             return false;
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
     public function schema_changes_before_migration()
100 100
     {
101 101
         //relies on 4.1's EEH_Activation::create_table
102
-        require_once(EE_HELPERS . 'EEH_Activation.helper.php');
102
+        require_once(EE_HELPERS.'EEH_Activation.helper.php');
103 103
         $table_name = 'esp_answer';
104 104
         $sql = " ANS_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
105 105
 					REG_ID INT UNSIGNED NOT NULL,
@@ -546,7 +546,7 @@  discard block
 block discarded – undo
546 546
     public function add_default_admin_only_payments()
547 547
     {
548 548
         global $wpdb;
549
-        $table_name = $wpdb->prefix . "esp_payment_method";
549
+        $table_name = $wpdb->prefix."esp_payment_method";
550 550
         $user_id = EEH_Activation::get_default_creator_id();
551 551
         if ($this->_get_table_analysis()->tableExists($table_name)) {
552 552
             $SQL = "SELECT COUNT( * ) FROM $table_name";
@@ -585,13 +585,13 @@  discard block
 block discarded – undo
585 585
                         $table_name,
586 586
                         $values,
587 587
                         array(
588
-                            '%s',//PMD_type
589
-                            '%s',//PMD_name
590
-                            '%s',//PMD_admin_name
591
-                            '%s',//PMD_admin_desc
592
-                            '%s',//PMD_slug
593
-                            '%d',//PMD_wp_user
594
-                            '%s',//PMD_scope
588
+                            '%s', //PMD_type
589
+                            '%s', //PMD_name
590
+                            '%s', //PMD_admin_name
591
+                            '%s', //PMD_admin_desc
592
+                            '%s', //PMD_slug
593
+                            '%d', //PMD_wp_user
594
+                            '%s', //PMD_scope
595 595
                         )
596 596
                     );
597 597
                     if ( ! $success) {
@@ -614,7 +614,7 @@  discard block
 block discarded – undo
614 614
     public function insert_default_currencies()
615 615
     {
616 616
         global $wpdb;
617
-        $currency_table = $wpdb->prefix . "esp_currency";
617
+        $currency_table = $wpdb->prefix."esp_currency";
618 618
         if ($this->_get_table_analysis()->tableExists($currency_table)) {
619 619
             $SQL = "SELECT COUNT('CUR_code') FROM $currency_table";
620 620
             $countries = $wpdb->get_var($SQL);
Please login to merge, or discard this patch.
Indentation   +269 added lines, -269 removed lines patch added patch discarded remove patch
@@ -14,9 +14,9 @@  discard block
 block discarded – undo
14 14
 $stages = glob(EE_CORE . 'data_migration_scripts/4_6_0_stages/*');
15 15
 $class_to_filepath = array();
16 16
 foreach ($stages as $filepath) {
17
-    $matches = array();
18
-    preg_match('~4_6_0_stages/(.*).dmsstage.php~', $filepath, $matches);
19
-    $class_to_filepath[$matches[1]] = $filepath;
17
+	$matches = array();
18
+	preg_match('~4_6_0_stages/(.*).dmsstage.php~', $filepath, $matches);
19
+	$class_to_filepath[$matches[1]] = $filepath;
20 20
 }
21 21
 //give addons a chance to autoload their stages too
22 22
 $class_to_filepath = apply_filters('FHEE__EE_DMS_4_6_0__autoloaded_stages', $class_to_filepath);
@@ -35,69 +35,69 @@  discard block
 block discarded – undo
35 35
 class EE_DMS_Core_4_6_0 extends EE_Data_Migration_Script_Base
36 36
 {
37 37
 
38
-    /**
39
-     * return EE_DMS_Core_4_6_0
40
-     *
41
-     * @param TableManager  $table_manager
42
-     * @param TableAnalysis $table_analysis
43
-     */
44
-    public function __construct(TableManager $table_manager = null, TableAnalysis $table_analysis = null)
45
-    {
46
-        $this->_pretty_name = __("Data Update to Event Espresso 4.6.0", "event_espresso");
47
-        $this->_priority = 10;
48
-        $this->_migration_stages = array(
49
-            new EE_DMS_4_6_0_gateways(),
50
-            new EE_DMS_4_6_0_question_types(),
51
-            new EE_DMS_4_6_0_country_system_question(),
52
-            new EE_DMS_4_6_0_state_system_question(),
53
-            new EE_DMS_4_6_0_billing_info(),
54
-            new EE_DMS_4_6_0_transactions(),
55
-            new EE_DMS_4_6_0_payments(),
56
-            new EE_DMS_4_6_0_invoice_settings(),
57
-        );
58
-        parent::__construct($table_manager, $table_analysis);
59
-    }
60
-
61
-
62
-
63
-    /**
64
-     * @param array $version_array
65
-     * @return bool
66
-     */
67
-    public function can_migrate_from_version($version_array)
68
-    {
69
-        $version_string = $version_array['Core'];
70
-        if (version_compare($version_string, '4.6.0', '<=') && version_compare($version_string, '4.5.0', '>=')) {
38
+	/**
39
+	 * return EE_DMS_Core_4_6_0
40
+	 *
41
+	 * @param TableManager  $table_manager
42
+	 * @param TableAnalysis $table_analysis
43
+	 */
44
+	public function __construct(TableManager $table_manager = null, TableAnalysis $table_analysis = null)
45
+	{
46
+		$this->_pretty_name = __("Data Update to Event Espresso 4.6.0", "event_espresso");
47
+		$this->_priority = 10;
48
+		$this->_migration_stages = array(
49
+			new EE_DMS_4_6_0_gateways(),
50
+			new EE_DMS_4_6_0_question_types(),
51
+			new EE_DMS_4_6_0_country_system_question(),
52
+			new EE_DMS_4_6_0_state_system_question(),
53
+			new EE_DMS_4_6_0_billing_info(),
54
+			new EE_DMS_4_6_0_transactions(),
55
+			new EE_DMS_4_6_0_payments(),
56
+			new EE_DMS_4_6_0_invoice_settings(),
57
+		);
58
+		parent::__construct($table_manager, $table_analysis);
59
+	}
60
+
61
+
62
+
63
+	/**
64
+	 * @param array $version_array
65
+	 * @return bool
66
+	 */
67
+	public function can_migrate_from_version($version_array)
68
+	{
69
+		$version_string = $version_array['Core'];
70
+		if (version_compare($version_string, '4.6.0', '<=') && version_compare($version_string, '4.5.0', '>=')) {
71 71
 //			echo "$version_string can be migrated from";
72
-            return true;
73
-        } elseif ( ! $version_string) {
72
+			return true;
73
+		} elseif ( ! $version_string) {
74 74
 //			echo "no version string provided: $version_string";
75
-            //no version string provided... this must be pre 4.3
76
-            return false;//changed mind. dont want people thinking they should migrate yet because they cant
77
-        } else {
75
+			//no version string provided... this must be pre 4.3
76
+			return false;//changed mind. dont want people thinking they should migrate yet because they cant
77
+		} else {
78 78
 //			echo "$version_string doesnt apply";
79
-            return false;
80
-        }
81
-    }
79
+			return false;
80
+		}
81
+	}
82 82
 
83 83
 
84 84
 
85
-    /**
86
-     * @return bool
87
-     */
88
-    public function schema_changes_before_migration()
89
-    {
90
-        //relies on 4.1's EEH_Activation::create_table
91
-        require_once(EE_HELPERS . 'EEH_Activation.helper.php');
92
-        $table_name = 'esp_answer';
93
-        $sql = " ANS_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
85
+	/**
86
+	 * @return bool
87
+	 */
88
+	public function schema_changes_before_migration()
89
+	{
90
+		//relies on 4.1's EEH_Activation::create_table
91
+		require_once(EE_HELPERS . 'EEH_Activation.helper.php');
92
+		$table_name = 'esp_answer';
93
+		$sql = " ANS_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
94 94
 					REG_ID INT UNSIGNED NOT NULL,
95 95
 					QST_ID INT UNSIGNED NOT NULL,
96 96
 					ANS_value TEXT NOT NULL,
97 97
 					PRIMARY KEY  (ANS_ID)";
98
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
99
-        $table_name = 'esp_attendee_meta';
100
-        $sql = "ATTM_ID INT(10) UNSIGNED NOT	NULL AUTO_INCREMENT,
98
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
99
+		$table_name = 'esp_attendee_meta';
100
+		$sql = "ATTM_ID INT(10) UNSIGNED NOT	NULL AUTO_INCREMENT,
101 101
 						ATT_ID BIGINT(20) UNSIGNED NOT NULL,
102 102
 						ATT_fname VARCHAR(45) NOT NULL,
103 103
 						ATT_lname VARCHAR(45) NOT	NULL,
@@ -113,9 +113,9 @@  discard block
 block discarded – undo
113 113
 								KEY ATT_fname (ATT_fname),
114 114
 								KEY ATT_lname (ATT_lname),
115 115
 								KEY ATT_email (ATT_email)";
116
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
117
-        $table_name = 'esp_country';
118
-        $sql = "CNT_ISO VARCHAR(2) COLLATE utf8_bin NOT NULL,
116
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
117
+		$table_name = 'esp_country';
118
+		$sql = "CNT_ISO VARCHAR(2) COLLATE utf8_bin NOT NULL,
119 119
 					  CNT_ISO3 VARCHAR(3) COLLATE utf8_bin NOT NULL,
120 120
 					  RGN_ID TINYINT(3) UNSIGNED DEFAULT NULL,
121 121
 					  CNT_name VARCHAR(45) COLLATE utf8_bin NOT NULL,
@@ -131,24 +131,24 @@  discard block
 block discarded – undo
131 131
 					  CNT_is_EU TINYINT(1) DEFAULT '0',
132 132
 					  CNT_active TINYINT(1) DEFAULT '0',
133 133
 					  PRIMARY KEY  (CNT_ISO)";
134
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
135
-        $table_name = 'esp_currency';
136
-        $sql = "CUR_code VARCHAR(6) COLLATE utf8_bin NOT NULL,
134
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
135
+		$table_name = 'esp_currency';
136
+		$sql = "CUR_code VARCHAR(6) COLLATE utf8_bin NOT NULL,
137 137
 				CUR_single VARCHAR(45) COLLATE utf8_bin DEFAULT 'dollar',
138 138
 				CUR_plural VARCHAR(45) COLLATE utf8_bin DEFAULT 'dollars',
139 139
 				CUR_sign VARCHAR(45) COLLATE utf8_bin DEFAULT '$',
140 140
 				CUR_dec_plc VARCHAR(1) COLLATE utf8_bin NOT NULL DEFAULT '2',
141 141
 				CUR_active TINYINT(1) DEFAULT '0',
142 142
 				PRIMARY KEY  (CUR_code)";
143
-        $this->_table_is_new_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
144
-        $table_name = 'esp_currency_payment_method';
145
-        $sql = "CPM_ID INT(11) NOT NULL AUTO_INCREMENT,
143
+		$this->_table_is_new_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
144
+		$table_name = 'esp_currency_payment_method';
145
+		$sql = "CPM_ID INT(11) NOT NULL AUTO_INCREMENT,
146 146
 				CUR_code  VARCHAR(6) COLLATE utf8_bin NOT NULL,
147 147
 				PMD_ID INT(11) NOT NULL,
148 148
 				PRIMARY KEY  (CPM_ID)";
149
-        $this->_table_is_new_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
150
-        $table_name = 'esp_datetime';
151
-        $sql = "DTT_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
149
+		$this->_table_is_new_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
150
+		$table_name = 'esp_datetime';
151
+		$sql = "DTT_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
152 152
 				  EVT_ID BIGINT(20) UNSIGNED NOT NULL,
153 153
 				  DTT_name VARCHAR(255) NOT NULL DEFAULT '',
154 154
 				  DTT_description TEXT NOT NULL,
@@ -163,9 +163,9 @@  discard block
 block discarded – undo
163 163
 						PRIMARY KEY  (DTT_ID),
164 164
 						KEY EVT_ID (EVT_ID),
165 165
 						KEY DTT_is_primary (DTT_is_primary)";
166
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
167
-        $table_name = 'esp_event_meta';
168
-        $sql = "
166
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
167
+		$table_name = 'esp_event_meta';
168
+		$sql = "
169 169
 			EVTM_ID INT NOT NULL AUTO_INCREMENT,
170 170
 			EVT_ID BIGINT(20) UNSIGNED NOT NULL,
171 171
 			EVT_display_desc TINYINT(1) UNSIGNED NOT NULL DEFAULT 1,
@@ -180,31 +180,31 @@  discard block
 block discarded – undo
180 180
 			EVT_external_URL VARCHAR(200) NULL,
181 181
 			EVT_donations TINYINT(1) NULL,
182 182
 			PRIMARY KEY  (EVTM_ID)";
183
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
184
-        $table_name = 'esp_event_question_group';
185
-        $sql = "EQG_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
183
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
184
+		$table_name = 'esp_event_question_group';
185
+		$sql = "EQG_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
186 186
 					EVT_ID BIGINT(20) UNSIGNED NOT NULL,
187 187
 					QSG_ID INT UNSIGNED NOT NULL,
188 188
 					EQG_primary TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
189 189
 					PRIMARY KEY  (EQG_ID)";
190
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
191
-        $table_name = 'esp_event_venue';
192
-        $sql = "EVV_ID INT(11) NOT NULL AUTO_INCREMENT,
190
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
191
+		$table_name = 'esp_event_venue';
192
+		$sql = "EVV_ID INT(11) NOT NULL AUTO_INCREMENT,
193 193
 				EVT_ID BIGINT(20) UNSIGNED NOT NULL,
194 194
 				VNU_ID BIGINT(20) UNSIGNED NOT NULL,
195 195
 				EVV_primary TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
196 196
 				PRIMARY KEY  (EVV_ID)";
197
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
198
-        $table_name = 'esp_extra_meta';
199
-        $sql = "EXM_ID INT(11) NOT NULL AUTO_INCREMENT,
197
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
198
+		$table_name = 'esp_extra_meta';
199
+		$sql = "EXM_ID INT(11) NOT NULL AUTO_INCREMENT,
200 200
 				OBJ_ID INT(11) DEFAULT NULL,
201 201
 				EXM_type VARCHAR(45) DEFAULT NULL,
202 202
 				EXM_key VARCHAR(45) DEFAULT NULL,
203 203
 				EXM_value TEXT,
204 204
 				PRIMARY KEY  (EXM_ID)";
205
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
206
-        $table_name = 'esp_line_item';
207
-        $sql = "LIN_ID INT(11) NOT NULL AUTO_INCREMENT,
205
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
206
+		$table_name = 'esp_line_item';
207
+		$sql = "LIN_ID INT(11) NOT NULL AUTO_INCREMENT,
208 208
 				LIN_code VARCHAR(245) NOT NULL DEFAULT '',
209 209
 				TXN_ID INT(11) DEFAULT NULL,
210 210
 				LIN_name VARCHAR(245) NOT NULL DEFAULT '',
@@ -220,9 +220,9 @@  discard block
 block discarded – undo
220 220
 				OBJ_ID INT(11) DEFAULT NULL,
221 221
 				OBJ_type VARCHAR(45)DEFAULT NULL,
222 222
 				PRIMARY KEY  (LIN_ID)";
223
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
224
-        $table_name = 'esp_log';
225
-        $sql = "LOG_ID INT(11) NOT NULL AUTO_INCREMENT,
223
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
224
+		$table_name = 'esp_log';
225
+		$sql = "LOG_ID INT(11) NOT NULL AUTO_INCREMENT,
226 226
 				LOG_time DATETIME DEFAULT NULL,
227 227
 				OBJ_ID VARCHAR(45) DEFAULT NULL,
228 228
 				OBJ_type VARCHAR(45) DEFAULT NULL,
@@ -230,19 +230,19 @@  discard block
 block discarded – undo
230 230
 				LOG_message TEXT,
231 231
 				LOG_wp_user INT(11) DEFAULT NULL,
232 232
 				PRIMARY KEY  (LOG_ID)";
233
-        $this->_table_is_new_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
234
-        $table_name = 'esp_message_template';
235
-        $sql = "MTP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
233
+		$this->_table_is_new_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
234
+		$table_name = 'esp_message_template';
235
+		$sql = "MTP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
236 236
 					GRP_ID INT(10) UNSIGNED NOT NULL,
237 237
 					MTP_context VARCHAR(50) NOT NULL,
238 238
 					MTP_template_field VARCHAR(30) NOT NULL,
239 239
 					MTP_content TEXT NOT NULL,
240 240
 					PRIMARY KEY  (MTP_ID),
241 241
 					KEY GRP_ID (GRP_ID)";
242
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
243
-        $this->_get_table_manager()->dropIndex('esp_message_template_group', 'EVT_ID');
244
-        $table_name = 'esp_message_template_group';
245
-        $sql = "GRP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
242
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
243
+		$this->_get_table_manager()->dropIndex('esp_message_template_group', 'EVT_ID');
244
+		$table_name = 'esp_message_template_group';
245
+		$sql = "GRP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
246 246
 					MTP_user_id INT(10) NOT NULL DEFAULT '1',
247 247
 					MTP_name VARCHAR(245) NOT NULL DEFAULT '',
248 248
 					MTP_description VARCHAR(245) NOT NULL DEFAULT '',
@@ -254,17 +254,17 @@  discard block
 block discarded – undo
254 254
 					MTP_is_active TINYINT(1) NOT NULL DEFAULT '1',
255 255
 					PRIMARY KEY  (GRP_ID),
256 256
 					KEY MTP_user_id (MTP_user_id)";
257
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
258
-        $table_name = 'esp_event_message_template';
259
-        $sql = "EMT_ID BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
257
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
258
+		$table_name = 'esp_event_message_template';
259
+		$sql = "EMT_ID BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
260 260
 					EVT_ID BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
261 261
 					GRP_ID INT(10) UNSIGNED NOT NULL DEFAULT 0,
262 262
 					PRIMARY KEY  (EMT_ID),
263 263
 					KEY EVT_ID (EVT_ID),
264 264
 					KEY GRP_ID (GRP_ID)";
265
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
266
-        $table_name = 'esp_payment';
267
-        $sql = "PAY_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
265
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
266
+		$table_name = 'esp_payment';
267
+		$sql = "PAY_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
268 268
 					TXN_ID INT(10) UNSIGNED DEFAULT NULL,
269 269
 					STS_ID VARCHAR(3) COLLATE utf8_bin DEFAULT NULL,
270 270
 					PAY_timestamp DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
@@ -281,9 +281,9 @@  discard block
 block discarded – undo
281 281
 					PRIMARY KEY  (PAY_ID),
282 282
 					KEY TXN_ID (TXN_ID),
283 283
 					KEY PAY_timestamp (PAY_timestamp)";
284
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
285
-        $table_name = 'esp_payment_method';
286
-        $sql = "PMD_ID INT(11) NOT NULL AUTO_INCREMENT,
284
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
285
+		$table_name = 'esp_payment_method';
286
+		$sql = "PMD_ID INT(11) NOT NULL AUTO_INCREMENT,
287 287
 				PMD_type VARCHAR(124) DEFAULT NULL,
288 288
 				PMD_name VARCHAR(255) DEFAULT NULL,
289 289
 				PMD_desc TEXT,
@@ -298,28 +298,28 @@  discard block
 block discarded – undo
298 298
 				PMD_scope VARCHAR(255) NULL DEFAULT 'frontend',
299 299
 				PRIMARY KEY  (PMD_ID),
300 300
 				UNIQUE KEY PMD_slug_UNIQUE (PMD_slug)";
301
-        $this->_table_is_new_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
302
-        $table_name = "esp_ticket_price";
303
-        $sql = "TKP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
301
+		$this->_table_is_new_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
302
+		$table_name = "esp_ticket_price";
303
+		$sql = "TKP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
304 304
 					  TKT_ID INT(10) UNSIGNED NOT NULL,
305 305
 					  PRC_ID INT(10) UNSIGNED NOT NULL,
306 306
 					  PRIMARY KEY  (TKP_ID)";
307
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
308
-        $table_name = "esp_datetime_ticket";
309
-        $sql = "DTK_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
307
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
308
+		$table_name = "esp_datetime_ticket";
309
+		$sql = "DTK_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
310 310
 					  DTT_ID INT(10) UNSIGNED NOT NULL,
311 311
 					  TKT_ID INT(10) UNSIGNED NOT NULL,
312 312
 					  PRIMARY KEY  (DTK_ID)";
313
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
314
-        $table_name = "esp_ticket_template";
315
-        $sql = "TTM_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
313
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
314
+		$table_name = "esp_ticket_template";
315
+		$sql = "TTM_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
316 316
 					  TTM_name VARCHAR(45) NOT NULL,
317 317
 					  TTM_description TEXT,
318 318
 					  TTM_file VARCHAR(45),
319 319
 					  PRIMARY KEY  (TTM_ID)";
320
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
321
-        $table_name = 'esp_question';
322
-        $sql = 'QST_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
320
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
321
+		$table_name = 'esp_question';
322
+		$sql = 'QST_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
323 323
 					QST_display_text TEXT NOT NULL,
324 324
 					QST_admin_label VARCHAR(255) NOT NULL,
325 325
 					QST_system VARCHAR(25) DEFAULT NULL,
@@ -331,25 +331,25 @@  discard block
 block discarded – undo
331 331
 					QST_wp_user BIGINT UNSIGNED NULL,
332 332
 					QST_deleted TINYINT UNSIGNED NOT NULL DEFAULT 0,
333 333
 					PRIMARY KEY  (QST_ID)';
334
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
335
-        $table_name = 'esp_question_group_question';
336
-        $sql = "QGQ_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
334
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
335
+		$table_name = 'esp_question_group_question';
336
+		$sql = "QGQ_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
337 337
 					QSG_ID INT UNSIGNED NOT NULL,
338 338
 					QST_ID INT UNSIGNED NOT NULL,
339 339
 					QGQ_order INT UNSIGNED NOT NULL DEFAULT 0,
340 340
 					PRIMARY KEY  (QGQ_ID) ";
341
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
342
-        $table_name = 'esp_question_option';
343
-        $sql = "QSO_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
341
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
342
+		$table_name = 'esp_question_option';
343
+		$sql = "QSO_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
344 344
 					QSO_value VARCHAR(255) NOT NULL,
345 345
 					QSO_desc TEXT NOT NULL,
346 346
 					QST_ID INT UNSIGNED NOT NULL,
347 347
 					QSO_order INT UNSIGNED NOT NULL DEFAULT 0,
348 348
 					QSO_deleted TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
349 349
 					PRIMARY KEY  (QSO_ID)";
350
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
351
-        $table_name = 'esp_registration';
352
-        $sql = "REG_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
350
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
351
+		$table_name = 'esp_registration';
352
+		$sql = "REG_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
353 353
 					  EVT_ID BIGINT(20) UNSIGNED NOT NULL,
354 354
 					  ATT_ID BIGINT(20) UNSIGNED NOT NULL,
355 355
 					  TXN_ID INT(10) UNSIGNED NOT NULL,
@@ -372,25 +372,25 @@  discard block
 block discarded – undo
372 372
 					  KEY STS_ID (STS_ID),
373 373
 					  KEY REG_url_link (REG_url_link),
374 374
 					  KEY REG_code (REG_code)";
375
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
376
-        $table_name = 'esp_checkin';
377
-        $sql = "CHK_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
375
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
376
+		$table_name = 'esp_checkin';
377
+		$sql = "CHK_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
378 378
 					REG_ID INT(10) UNSIGNED NOT NULL,
379 379
 					DTT_ID INT(10) UNSIGNED NOT NULL,
380 380
 					CHK_in TINYINT(1) UNSIGNED NOT NULL DEFAULT 1,
381 381
 					CHK_timestamp DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
382 382
 					PRIMARY KEY  (CHK_ID)";
383
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
384
-        $table_name = 'esp_state';
385
-        $sql = "STA_ID smallint(5) UNSIGNED NOT NULL AUTO_INCREMENT,
383
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
384
+		$table_name = 'esp_state';
385
+		$sql = "STA_ID smallint(5) UNSIGNED NOT NULL AUTO_INCREMENT,
386 386
 					  CNT_ISO VARCHAR(2) COLLATE utf8_bin NOT NULL,
387 387
 					  STA_abbrev VARCHAR(24) COLLATE utf8_bin NOT NULL,
388 388
 					  STA_name VARCHAR(100) COLLATE utf8_bin NOT NULL,
389 389
 					  STA_active TINYINT(1) DEFAULT '1',
390 390
 					  PRIMARY KEY  (STA_ID)";
391
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
392
-        $table_name = 'esp_status';
393
-        $sql = "STS_ID VARCHAR(3) COLLATE utf8_bin NOT NULL,
391
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
392
+		$table_name = 'esp_status';
393
+		$sql = "STS_ID VARCHAR(3) COLLATE utf8_bin NOT NULL,
394 394
 					  STS_code VARCHAR(45) COLLATE utf8_bin NOT NULL,
395 395
 					  STS_type set('event','registration','transaction','payment','email') COLLATE utf8_bin NOT NULL,
396 396
 					  STS_can_edit TINYINT(1) NOT NULL DEFAULT 0,
@@ -398,9 +398,9 @@  discard block
 block discarded – undo
398 398
 					  STS_open TINYINT(1) NOT NULL DEFAULT 1,
399 399
 					  UNIQUE KEY STS_ID_UNIQUE (STS_ID),
400 400
 					  KEY STS_type (STS_type)";
401
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
402
-        $table_name = 'esp_transaction';
403
-        $sql = "TXN_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
401
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
402
+		$table_name = 'esp_transaction';
403
+		$sql = "TXN_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
404 404
 					  TXN_timestamp DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
405 405
 					  TXN_total DECIMAL(10,3) DEFAULT '0.00',
406 406
 					  TXN_paid DECIMAL(10,3) NOT NULL DEFAULT '0.00',
@@ -412,9 +412,9 @@  discard block
 block discarded – undo
412 412
 					  PRIMARY KEY  (TXN_ID),
413 413
 					  KEY TXN_timestamp (TXN_timestamp),
414 414
 					  KEY STS_ID (STS_ID)";
415
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
416
-        $table_name = 'esp_venue_meta';
417
-        $sql = "VNUM_ID INT(11) NOT NULL AUTO_INCREMENT,
415
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
416
+		$table_name = 'esp_venue_meta';
417
+		$sql = "VNUM_ID INT(11) NOT NULL AUTO_INCREMENT,
418 418
 			VNU_ID BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
419 419
 			VNU_address VARCHAR(255) DEFAULT NULL,
420 420
 			VNU_address2 VARCHAR(255) DEFAULT NULL,
@@ -432,10 +432,10 @@  discard block
 block discarded – undo
432 432
 			PRIMARY KEY  (VNUM_ID),
433 433
 			KEY STA_ID (STA_ID),
434 434
 			KEY CNT_ISO (CNT_ISO)";
435
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
436
-        //modified tables
437
-        $table_name = "esp_price";
438
-        $sql = "PRC_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
435
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
436
+		//modified tables
437
+		$table_name = "esp_price";
438
+		$sql = "PRC_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
439 439
 					  PRT_ID TINYINT(3) UNSIGNED NOT NULL,
440 440
 					  PRC_amount DECIMAL(10,3) NOT NULL DEFAULT '0.00',
441 441
 					  PRC_name VARCHAR(245) NOT NULL,
@@ -447,9 +447,9 @@  discard block
 block discarded – undo
447 447
 					  PRC_wp_user BIGINT UNSIGNED NULL,
448 448
 					  PRC_parent INT(10) UNSIGNED DEFAULT 0,
449 449
 					  PRIMARY KEY  (PRC_ID)";
450
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
451
-        $table_name = "esp_price_type";
452
-        $sql = "PRT_ID TINYINT(3) UNSIGNED NOT NULL AUTO_INCREMENT,
450
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
451
+		$table_name = "esp_price_type";
452
+		$sql = "PRT_ID TINYINT(3) UNSIGNED NOT NULL AUTO_INCREMENT,
453 453
 				  PRT_name VARCHAR(45) NOT NULL,
454 454
 				  PBT_ID TINYINT(3) UNSIGNED NOT NULL DEFAULT '1',
455 455
 				  PRT_is_percent TINYINT(1) NOT NULL DEFAULT '0',
@@ -458,9 +458,9 @@  discard block
 block discarded – undo
458 458
 				  PRT_deleted TINYINT(1) NOT NULL DEFAULT '0',
459 459
 				  UNIQUE KEY PRT_name_UNIQUE (PRT_name),
460 460
 				  PRIMARY KEY  (PRT_ID)";
461
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
462
-        $table_name = "esp_ticket";
463
-        $sql = "TKT_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
461
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
462
+		$table_name = "esp_ticket";
463
+		$sql = "TKT_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
464 464
 					  TTM_ID INT(10) UNSIGNED NOT NULL,
465 465
 					  TKT_name VARCHAR(245) NOT NULL DEFAULT '',
466 466
 					  TKT_description TEXT NOT NULL,
@@ -481,10 +481,10 @@  discard block
 block discarded – undo
481 481
 					  TKT_parent INT(10) UNSIGNED DEFAULT '0',
482 482
 					  TKT_deleted TINYINT(1) NOT NULL DEFAULT '0',
483 483
 					  PRIMARY KEY  (TKT_ID)";
484
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
485
-        $this->_get_table_manager()->dropIndex('esp_question_group', 'QSG_identifier_UNIQUE');
486
-        $table_name = 'esp_question_group';
487
-        $sql = 'QSG_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
484
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
485
+		$this->_get_table_manager()->dropIndex('esp_question_group', 'QSG_identifier_UNIQUE');
486
+		$table_name = 'esp_question_group';
487
+		$sql = 'QSG_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
488 488
 					QSG_name VARCHAR(255) NOT NULL,
489 489
 					QSG_identifier VARCHAR(100) NOT NULL,
490 490
 					QSG_desc TEXT NULL,
@@ -496,119 +496,119 @@  discard block
 block discarded – undo
496 496
 					QSG_wp_user BIGINT UNSIGNED NULL,
497 497
 					PRIMARY KEY  (QSG_ID),
498 498
 					UNIQUE KEY QSG_identifier_UNIQUE (QSG_identifier ASC)';
499
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
500
-        /** @var EE_DMS_Core_4_1_0 $script_4_1_defaults */
501
-        $script_4_1_defaults = EE_Registry::instance()->load_dms('Core_4_1_0');
502
-        //(because many need to convert old string states to foreign keys into the states table)
503
-        $script_4_1_defaults->insert_default_states();
504
-        $script_4_1_defaults->insert_default_countries();
505
-        /** @var EE_DMS_Core_4_5_0 $script_4_5_defaults */
506
-        $script_4_5_defaults = EE_Registry::instance()->load_dms('Core_4_5_0');
507
-        $script_4_5_defaults->insert_default_price_types();
508
-        $script_4_5_defaults->insert_default_prices();
509
-        $script_4_5_defaults->insert_default_tickets();
510
-        //setting up the config wp option pretty well counts as a 'schema change', or at least should happen here
511
-        EE_Config::instance()->update_espresso_config(false, true);
512
-        $this->add_default_admin_only_payments();
513
-        $this->insert_default_currencies();
514
-        return true;
515
-    }
516
-
517
-
518
-
519
-    /**
520
-     * @return boolean
521
-     */
522
-    public function schema_changes_after_migration()
523
-    {
524
-        return true;
525
-    }
526
-
527
-
528
-
529
-    public function migration_page_hooks()
530
-    {
531
-    }
532
-
533
-
534
-
535
-    public function add_default_admin_only_payments()
536
-    {
537
-        global $wpdb;
538
-        $table_name = $wpdb->prefix . "esp_payment_method";
539
-        $user_id = EEH_Activation::get_default_creator_id();
540
-        if ($this->_get_table_analysis()->tableExists($table_name)) {
541
-            $SQL = "SELECT COUNT( * ) FROM $table_name";
542
-            $existing_payment_methods = $wpdb->get_var($SQL);
543
-            $default_admin_only_payment_methods = apply_filters(
544
-                'FHEE__EEH_Activation__add_default_admin_only_payments__default_admin_only_payment_methods',
545
-                array(
546
-                    __("Bank", 'event_espresso')        => __("Bank Draft", 'event_espresso'),
547
-                    __("Cash", 'event_espresso')        => __("Cash Delivered Physically", 'event_espresso'),
548
-                    __("Check", 'event_espresso')       => __("Paper Check", 'event_espresso'),
549
-                    __("Credit Card", 'event_espresso') => __("Offline Credit Card Payment", 'event_espresso'),
550
-                    __("Debit Card", 'event_espresso')  => __("Offline Debit Payment", 'event_espresso'),
551
-                    __("Invoice", 'event_espresso')     => __("Invoice received with monies included",
552
-                        'event_espresso'),
553
-                    __("Money Order", 'event_espresso') => '',
554
-                    __("Paypal", 'event_espresso')      => __("Paypal eCheck, Invoice, etc", 'event_espresso'),
555
-                    __('Other', 'event_espresso')       => __('Other method of payment', 'event_espresso'),
556
-                ));
557
-            //make sure we hae payment method records for the following
558
-            //so admins can record payments for them from the admin page
559
-            foreach ($default_admin_only_payment_methods as $nicename => $description) {
560
-                $slug = sanitize_key($nicename);
561
-                //check that such a payment method exists
562
-                $exists = $wpdb->get_var($wpdb->prepare("SELECT count(*) FROM $table_name WHERE PMD_slug = %s", $slug));
563
-                if ( ! $exists) {
564
-                    $values = array(
565
-                        'PMD_type'       => 'Admin_Only',
566
-                        'PMD_name'       => $nicename,
567
-                        'PMD_admin_name' => $nicename,
568
-                        'PMD_admin_desc' => $description,
569
-                        'PMD_slug'       => $slug,
570
-                        'PMD_wp_user'    => $user_id,
571
-                        'PMD_scope'      => serialize(array('ADMIN')),
572
-                    );
573
-                    $success = $wpdb->insert(
574
-                        $table_name,
575
-                        $values,
576
-                        array(
577
-                            '%s',//PMD_type
578
-                            '%s',//PMD_name
579
-                            '%s',//PMD_admin_name
580
-                            '%s',//PMD_admin_desc
581
-                            '%s',//PMD_slug
582
-                            '%d',//PMD_wp_user
583
-                            '%s',//PMD_scope
584
-                        )
585
-                    );
586
-                    if ( ! $success) {
587
-                        $this->add_error(sprintf(__("Could not insert new admin-only payment method with values %s during migration",
588
-                            "event_espresso"), $this->_json_encode($values)));
589
-                    }
590
-                }
591
-            }
592
-        }
593
-    }
594
-
595
-
596
-
597
-    /**
598
-     * insert_default_countries
599
-     *
600
-     * @static
601
-     * @return void
602
-     */
603
-    public function insert_default_currencies()
604
-    {
605
-        global $wpdb;
606
-        $currency_table = $wpdb->prefix . "esp_currency";
607
-        if ($this->_get_table_analysis()->tableExists($currency_table)) {
608
-            $SQL = "SELECT COUNT('CUR_code') FROM $currency_table";
609
-            $countries = $wpdb->get_var($SQL);
610
-            if ( ! $countries) {
611
-                $SQL = "INSERT INTO $currency_table
499
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
500
+		/** @var EE_DMS_Core_4_1_0 $script_4_1_defaults */
501
+		$script_4_1_defaults = EE_Registry::instance()->load_dms('Core_4_1_0');
502
+		//(because many need to convert old string states to foreign keys into the states table)
503
+		$script_4_1_defaults->insert_default_states();
504
+		$script_4_1_defaults->insert_default_countries();
505
+		/** @var EE_DMS_Core_4_5_0 $script_4_5_defaults */
506
+		$script_4_5_defaults = EE_Registry::instance()->load_dms('Core_4_5_0');
507
+		$script_4_5_defaults->insert_default_price_types();
508
+		$script_4_5_defaults->insert_default_prices();
509
+		$script_4_5_defaults->insert_default_tickets();
510
+		//setting up the config wp option pretty well counts as a 'schema change', or at least should happen here
511
+		EE_Config::instance()->update_espresso_config(false, true);
512
+		$this->add_default_admin_only_payments();
513
+		$this->insert_default_currencies();
514
+		return true;
515
+	}
516
+
517
+
518
+
519
+	/**
520
+	 * @return boolean
521
+	 */
522
+	public function schema_changes_after_migration()
523
+	{
524
+		return true;
525
+	}
526
+
527
+
528
+
529
+	public function migration_page_hooks()
530
+	{
531
+	}
532
+
533
+
534
+
535
+	public function add_default_admin_only_payments()
536
+	{
537
+		global $wpdb;
538
+		$table_name = $wpdb->prefix . "esp_payment_method";
539
+		$user_id = EEH_Activation::get_default_creator_id();
540
+		if ($this->_get_table_analysis()->tableExists($table_name)) {
541
+			$SQL = "SELECT COUNT( * ) FROM $table_name";
542
+			$existing_payment_methods = $wpdb->get_var($SQL);
543
+			$default_admin_only_payment_methods = apply_filters(
544
+				'FHEE__EEH_Activation__add_default_admin_only_payments__default_admin_only_payment_methods',
545
+				array(
546
+					__("Bank", 'event_espresso')        => __("Bank Draft", 'event_espresso'),
547
+					__("Cash", 'event_espresso')        => __("Cash Delivered Physically", 'event_espresso'),
548
+					__("Check", 'event_espresso')       => __("Paper Check", 'event_espresso'),
549
+					__("Credit Card", 'event_espresso') => __("Offline Credit Card Payment", 'event_espresso'),
550
+					__("Debit Card", 'event_espresso')  => __("Offline Debit Payment", 'event_espresso'),
551
+					__("Invoice", 'event_espresso')     => __("Invoice received with monies included",
552
+						'event_espresso'),
553
+					__("Money Order", 'event_espresso') => '',
554
+					__("Paypal", 'event_espresso')      => __("Paypal eCheck, Invoice, etc", 'event_espresso'),
555
+					__('Other', 'event_espresso')       => __('Other method of payment', 'event_espresso'),
556
+				));
557
+			//make sure we hae payment method records for the following
558
+			//so admins can record payments for them from the admin page
559
+			foreach ($default_admin_only_payment_methods as $nicename => $description) {
560
+				$slug = sanitize_key($nicename);
561
+				//check that such a payment method exists
562
+				$exists = $wpdb->get_var($wpdb->prepare("SELECT count(*) FROM $table_name WHERE PMD_slug = %s", $slug));
563
+				if ( ! $exists) {
564
+					$values = array(
565
+						'PMD_type'       => 'Admin_Only',
566
+						'PMD_name'       => $nicename,
567
+						'PMD_admin_name' => $nicename,
568
+						'PMD_admin_desc' => $description,
569
+						'PMD_slug'       => $slug,
570
+						'PMD_wp_user'    => $user_id,
571
+						'PMD_scope'      => serialize(array('ADMIN')),
572
+					);
573
+					$success = $wpdb->insert(
574
+						$table_name,
575
+						$values,
576
+						array(
577
+							'%s',//PMD_type
578
+							'%s',//PMD_name
579
+							'%s',//PMD_admin_name
580
+							'%s',//PMD_admin_desc
581
+							'%s',//PMD_slug
582
+							'%d',//PMD_wp_user
583
+							'%s',//PMD_scope
584
+						)
585
+					);
586
+					if ( ! $success) {
587
+						$this->add_error(sprintf(__("Could not insert new admin-only payment method with values %s during migration",
588
+							"event_espresso"), $this->_json_encode($values)));
589
+					}
590
+				}
591
+			}
592
+		}
593
+	}
594
+
595
+
596
+
597
+	/**
598
+	 * insert_default_countries
599
+	 *
600
+	 * @static
601
+	 * @return void
602
+	 */
603
+	public function insert_default_currencies()
604
+	{
605
+		global $wpdb;
606
+		$currency_table = $wpdb->prefix . "esp_currency";
607
+		if ($this->_get_table_analysis()->tableExists($currency_table)) {
608
+			$SQL = "SELECT COUNT('CUR_code') FROM $currency_table";
609
+			$countries = $wpdb->get_var($SQL);
610
+			if ( ! $countries) {
611
+				$SQL = "INSERT INTO $currency_table
612 612
 				( CUR_code, CUR_single, CUR_plural, CUR_sign, CUR_dec_plc, CUR_active) VALUES
613 613
 				( 'EUR',  'Euro',  'Euros',  '€',  2,1),
614 614
 				( 'AED',  'Dirham',  'Dirhams', 'د.إ',2,1),
@@ -762,10 +762,10 @@  discard block
 block discarded – undo
762 762
 				( 'ZAR',  'Rand',  'Rands',  'R',  2,1),
763 763
 				( 'ZMK',  'Kwacha',  'Kwachas',  '',  2,1),
764 764
 				( 'ZWD', 'Dollar', 'Dollars', 'Z$', 2,1);";
765
-                $wpdb->query($SQL);
766
-            }
767
-        }
768
-    }
765
+				$wpdb->query($SQL);
766
+			}
767
+		}
768
+	}
769 769
 
770 770
 }
771 771
 
Please login to merge, or discard this patch.
core/data_migration_scripts/EE_DMS_Core_4_8_0.dms.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 //unfortunately, this needs to be done upon INCLUSION of this file,
15 15
 //instead of construction, because it only gets constructed on first page load
16 16
 //(all other times it gets resurrected from a wordpress option)
17
-$stages = glob(EE_CORE . 'data_migration_scripts/4_8_0_stages/*');
17
+$stages = glob(EE_CORE.'data_migration_scripts/4_8_0_stages/*');
18 18
 $class_to_filepath = array();
19 19
 foreach ($stages as $filepath) {
20 20
     $matches = array();
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         } elseif ( ! $version_string) {
76 76
 //			echo "no version string provided: $version_string";
77 77
             //no version string provided... this must be pre 4.3
78
-            return false;//changed mind. dont want people thinking they should migrate yet because they cant
78
+            return false; //changed mind. dont want people thinking they should migrate yet because they cant
79 79
         } else {
80 80
 //			echo "$version_string doesnt apply";
81 81
             return false;
@@ -99,9 +99,9 @@  discard block
 block discarded – undo
99 99
      */
100 100
     public function schema_changes_before_migration()
101 101
     {
102
-        require_once(EE_HELPERS . 'EEH_Activation.helper.php');
102
+        require_once(EE_HELPERS.'EEH_Activation.helper.php');
103 103
         $now_in_mysql = current_time('mysql', true);
104
-        require_once(EE_HELPERS . 'EEH_Activation.helper.php');
104
+        require_once(EE_HELPERS.'EEH_Activation.helper.php');
105 105
         $table_name = 'esp_answer';
106 106
         $sql = " ANS_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
107 107
 					REG_ID int(10) unsigned NOT NULL,
@@ -697,7 +697,7 @@  discard block
 block discarded – undo
697 697
             ),
698 698
         );
699 699
         global $wpdb;
700
-        $country_table = $wpdb->prefix . "esp_country";
700
+        $country_table = $wpdb->prefix."esp_country";
701 701
         $country_format = array(
702 702
             "CNT_ISO"         => '%s',
703 703
             "CNT_ISO3"        => '%s',
@@ -743,7 +743,7 @@  discard block
 block discarded – undo
743 743
             array('RSD', 'Dinar', 'Dinars', '', 3, 1),
744 744
         );
745 745
         global $wpdb;
746
-        $currency_table = $wpdb->prefix . "esp_currency";
746
+        $currency_table = $wpdb->prefix."esp_currency";
747 747
         $currency_format = array(
748 748
             "CUR_code"    => '%s',
749 749
             "CUR_single"  => '%s',
Please login to merge, or discard this patch.
Indentation   +355 added lines, -355 removed lines patch added patch discarded remove patch
@@ -17,9 +17,9 @@  discard block
 block discarded – undo
17 17
 $stages = glob(EE_CORE . 'data_migration_scripts/4_8_0_stages/*');
18 18
 $class_to_filepath = array();
19 19
 foreach ($stages as $filepath) {
20
-    $matches = array();
21
-    preg_match('~4_8_0_stages/(.*).dmsstage.php~', $filepath, $matches);
22
-    $class_to_filepath[$matches[1]] = $filepath;
20
+	$matches = array();
21
+	preg_match('~4_8_0_stages/(.*).dmsstage.php~', $filepath, $matches);
22
+	$class_to_filepath[$matches[1]] = $filepath;
23 23
 }
24 24
 //give addons a chance to autoload their stages too
25 25
 $class_to_filepath = apply_filters('FHEE__EE_DMS_4_8_0__autoloaded_stages', $class_to_filepath);
@@ -38,71 +38,71 @@  discard block
 block discarded – undo
38 38
 class EE_DMS_Core_4_8_0 extends EE_Data_Migration_Script_Base
39 39
 {
40 40
 
41
-    /**
42
-     * return EE_DMS_Core_4_8_0
43
-     *
44
-     * @param TableManager  $table_manager
45
-     * @param TableAnalysis $table_analysis
46
-     */
47
-    public function __construct(TableManager $table_manager = null, TableAnalysis $table_analysis = null)
48
-    {
49
-        $this->_pretty_name = esc_html__("Data Update to Event Espresso 4.8.0", "event_espresso");
50
-        $this->_priority = 10;
51
-        $this->_migration_stages = array(
52
-            new EE_DMS_4_8_0_pretax_totals(),
53
-            new EE_DMS_4_8_0_event_subtotals(),
54
-        );
55
-        parent::__construct($table_manager, $table_analysis);
56
-    }
41
+	/**
42
+	 * return EE_DMS_Core_4_8_0
43
+	 *
44
+	 * @param TableManager  $table_manager
45
+	 * @param TableAnalysis $table_analysis
46
+	 */
47
+	public function __construct(TableManager $table_manager = null, TableAnalysis $table_analysis = null)
48
+	{
49
+		$this->_pretty_name = esc_html__("Data Update to Event Espresso 4.8.0", "event_espresso");
50
+		$this->_priority = 10;
51
+		$this->_migration_stages = array(
52
+			new EE_DMS_4_8_0_pretax_totals(),
53
+			new EE_DMS_4_8_0_event_subtotals(),
54
+		);
55
+		parent::__construct($table_manager, $table_analysis);
56
+	}
57 57
 
58 58
 
59 59
 
60
-    /**
61
-     * Because this is being done at basically the same time as the MER-ready branch
62
-     * of core, it's possible people might have installed MEr-ready branch first,
63
-     * and then this one, in which case we still want to perform this migration,
64
-     * even though the version might not have increased
65
-     *
66
-     * @param array $version_array
67
-     * @return bool
68
-     */
69
-    public function can_migrate_from_version($version_array)
70
-    {
71
-        $version_string = $version_array['Core'];
72
-        if (version_compare($version_string, '4.8.0', '<=') && version_compare($version_string, '4.7.0', '>=')) {
60
+	/**
61
+	 * Because this is being done at basically the same time as the MER-ready branch
62
+	 * of core, it's possible people might have installed MEr-ready branch first,
63
+	 * and then this one, in which case we still want to perform this migration,
64
+	 * even though the version might not have increased
65
+	 *
66
+	 * @param array $version_array
67
+	 * @return bool
68
+	 */
69
+	public function can_migrate_from_version($version_array)
70
+	{
71
+		$version_string = $version_array['Core'];
72
+		if (version_compare($version_string, '4.8.0', '<=') && version_compare($version_string, '4.7.0', '>=')) {
73 73
 //			echo "$version_string can be migrated from";
74
-            return true;
75
-        } elseif ( ! $version_string) {
74
+			return true;
75
+		} elseif ( ! $version_string) {
76 76
 //			echo "no version string provided: $version_string";
77
-            //no version string provided... this must be pre 4.3
78
-            return false;//changed mind. dont want people thinking they should migrate yet because they cant
79
-        } else {
77
+			//no version string provided... this must be pre 4.3
78
+			return false;//changed mind. dont want people thinking they should migrate yet because they cant
79
+		} else {
80 80
 //			echo "$version_string doesnt apply";
81
-            return false;
82
-        }
83
-    }
81
+			return false;
82
+		}
83
+	}
84 84
 
85 85
 
86 86
 
87
-    /**
88
-     * @return bool
89
-     */
90
-    public function schema_changes_before_migration()
91
-    {
92
-        require_once(EE_HELPERS . 'EEH_Activation.helper.php');
93
-        $now_in_mysql = current_time('mysql', true);
94
-        require_once(EE_HELPERS . 'EEH_Activation.helper.php');
95
-        $table_name = 'esp_answer';
96
-        $sql = " ANS_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
87
+	/**
88
+	 * @return bool
89
+	 */
90
+	public function schema_changes_before_migration()
91
+	{
92
+		require_once(EE_HELPERS . 'EEH_Activation.helper.php');
93
+		$now_in_mysql = current_time('mysql', true);
94
+		require_once(EE_HELPERS . 'EEH_Activation.helper.php');
95
+		$table_name = 'esp_answer';
96
+		$sql = " ANS_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
97 97
 					REG_ID int(10) unsigned NOT NULL,
98 98
 					QST_ID int(10) unsigned NOT NULL,
99 99
 					ANS_value text NOT NULL,
100 100
 					PRIMARY KEY  (ANS_ID),
101 101
 					KEY REG_ID (REG_ID),
102 102
 					KEY QST_ID (QST_ID)";
103
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
104
-        $table_name = 'esp_attendee_meta';
105
-        $sql = "ATTM_ID int(10) unsigned NOT	NULL AUTO_INCREMENT,
103
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
104
+		$table_name = 'esp_attendee_meta';
105
+		$sql = "ATTM_ID int(10) unsigned NOT	NULL AUTO_INCREMENT,
106 106
 						ATT_ID bigint(20) unsigned NOT NULL,
107 107
 						ATT_fname varchar(45) NOT NULL,
108 108
 						ATT_lname varchar(45) NOT	NULL,
@@ -119,9 +119,9 @@  discard block
 block discarded – undo
119 119
 								KEY ATT_email (ATT_email),
120 120
 								KEY ATT_lname (ATT_lname),
121 121
 								KEY ATT_fname (ATT_fname)";
122
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
123
-        $table_name = 'esp_country';
124
-        $sql = "CNT_ISO varchar(2) collate utf8_bin NOT NULL,
122
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
123
+		$table_name = 'esp_country';
124
+		$sql = "CNT_ISO varchar(2) collate utf8_bin NOT NULL,
125 125
 					  CNT_ISO3 varchar(3) collate utf8_bin NOT NULL,
126 126
 					  RGN_ID tinyint(3) unsigned DEFAULT NULL,
127 127
 					  CNT_name varchar(45) collate utf8_bin NOT NULL,
@@ -137,25 +137,25 @@  discard block
 block discarded – undo
137 137
 					  CNT_is_EU tinyint(1) DEFAULT '0',
138 138
 					  CNT_active tinyint(1) DEFAULT '0',
139 139
 					  PRIMARY KEY  (CNT_ISO)";
140
-        $this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
141
-        $table_name = 'esp_currency';
142
-        $sql = "CUR_code varchar(6) collate utf8_bin NOT NULL,
140
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
141
+		$table_name = 'esp_currency';
142
+		$sql = "CUR_code varchar(6) collate utf8_bin NOT NULL,
143 143
 				CUR_single varchar(45) collate utf8_bin DEFAULT 'dollar',
144 144
 				CUR_plural varchar(45) collate utf8_bin DEFAULT 'dollars',
145 145
 				CUR_sign varchar(45) collate utf8_bin DEFAULT '$',
146 146
 				CUR_dec_plc varchar(1) collate utf8_bin NOT NULL DEFAULT '2',
147 147
 				CUR_active tinyint(1) DEFAULT '0',
148 148
 				PRIMARY KEY  (CUR_code)";
149
-        $this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
150
-        $table_name = 'esp_currency_payment_method';
151
-        $sql = "CPM_ID int(11) NOT NULL AUTO_INCREMENT,
149
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
150
+		$table_name = 'esp_currency_payment_method';
151
+		$sql = "CPM_ID int(11) NOT NULL AUTO_INCREMENT,
152 152
 				CUR_code varchar(6) collate utf8_bin NOT NULL,
153 153
 				PMD_ID int(11) NOT NULL,
154 154
 				PRIMARY KEY  (CPM_ID),
155 155
 				KEY PMD_ID (PMD_ID)";
156
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
157
-        $table_name = 'esp_datetime';
158
-        $sql = "DTT_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
156
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
157
+		$table_name = 'esp_datetime';
158
+		$sql = "DTT_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
159 159
 				  EVT_ID bigint(20) unsigned NOT NULL,
160 160
 				  DTT_name varchar(255) NOT NULL DEFAULT '',
161 161
 				  DTT_description text NOT NULL,
@@ -171,9 +171,9 @@  discard block
 block discarded – undo
171 171
 						KEY DTT_EVT_start (DTT_EVT_start),
172 172
 						KEY EVT_ID (EVT_ID),
173 173
 						KEY DTT_is_primary (DTT_is_primary)";
174
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
175
-        $table_name = 'esp_event_meta';
176
-        $sql = "
174
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
175
+		$table_name = 'esp_event_meta';
176
+		$sql = "
177 177
 			EVTM_ID int(10) NOT NULL AUTO_INCREMENT,
178 178
 			EVT_ID bigint(20) unsigned NOT NULL,
179 179
 			EVT_display_desc tinyint(1) unsigned NOT NULL DEFAULT 1,
@@ -189,34 +189,34 @@  discard block
 block discarded – undo
189 189
 			EVT_donations tinyint(1) NULL,
190 190
 			PRIMARY KEY  (EVTM_ID),
191 191
 			KEY EVT_ID (EVT_ID)";
192
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
193
-        $table_name = 'esp_event_question_group';
194
-        $sql = "EQG_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
192
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
193
+		$table_name = 'esp_event_question_group';
194
+		$sql = "EQG_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
195 195
 					EVT_ID bigint(20) unsigned NOT NULL,
196 196
 					QSG_ID int(10) unsigned NOT NULL,
197 197
 					EQG_primary tinyint(1) unsigned NOT NULL DEFAULT 0,
198 198
 					PRIMARY KEY  (EQG_ID),
199 199
 					KEY EVT_ID (EVT_ID),
200 200
 					KEY QSG_ID (QSG_ID)";
201
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
202
-        $table_name = 'esp_event_venue';
203
-        $sql = "EVV_ID int(11) NOT NULL AUTO_INCREMENT,
201
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
202
+		$table_name = 'esp_event_venue';
203
+		$sql = "EVV_ID int(11) NOT NULL AUTO_INCREMENT,
204 204
 				EVT_ID bigint(20) unsigned NOT NULL,
205 205
 				VNU_ID bigint(20) unsigned NOT NULL,
206 206
 				EVV_primary tinyint(1) unsigned NOT NULL DEFAULT 0,
207 207
 				PRIMARY KEY  (EVV_ID)";
208
-        $this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
209
-        $table_name = 'esp_extra_meta';
210
-        $sql = "EXM_ID int(11) NOT NULL AUTO_INCREMENT,
208
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
209
+		$table_name = 'esp_extra_meta';
210
+		$sql = "EXM_ID int(11) NOT NULL AUTO_INCREMENT,
211 211
 				OBJ_ID int(11) DEFAULT NULL,
212 212
 				EXM_type varchar(45) DEFAULT NULL,
213 213
 				EXM_key varchar(45) DEFAULT NULL,
214 214
 				EXM_value text,
215 215
 				PRIMARY KEY  (EXM_ID),
216 216
 				KEY EXM_type (EXM_type,OBJ_ID,EXM_key)";
217
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
218
-        $table_name = 'esp_extra_join';
219
-        $sql = "EXJ_ID int(11) NOT NULL AUTO_INCREMENT,
217
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
218
+		$table_name = 'esp_extra_join';
219
+		$sql = "EXJ_ID int(11) NOT NULL AUTO_INCREMENT,
220 220
 				EXJ_first_model_id varchar(6) NOT NULL,
221 221
 				EXJ_first_model_name varchar(20) NOT NULL,
222 222
 				EXJ_second_model_id varchar(6) NOT NULL,
@@ -224,9 +224,9 @@  discard block
 block discarded – undo
224 224
 				PRIMARY KEY  (EXJ_ID),
225 225
 				KEY first_model (EXJ_first_model_name,EXJ_first_model_id),
226 226
 				KEY second_model (EXJ_second_model_name,EXJ_second_model_id)";
227
-        $this->_table_is_new_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
228
-        $table_name = 'esp_line_item';
229
-        $sql = "LIN_ID int(11) NOT NULL AUTO_INCREMENT,
227
+		$this->_table_is_new_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
228
+		$table_name = 'esp_line_item';
229
+		$sql = "LIN_ID int(11) NOT NULL AUTO_INCREMENT,
230 230
 				LIN_code varchar(245) NOT NULL DEFAULT '',
231 231
 				TXN_ID int(11) DEFAULT NULL,
232 232
 				LIN_name varchar(245) NOT NULL DEFAULT '',
@@ -245,9 +245,9 @@  discard block
 block discarded – undo
245 245
 				PRIMARY KEY  (LIN_ID),
246 246
 				KEY LIN_code (LIN_code(191)),
247 247
 				KEY TXN_ID (TXN_ID)";
248
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
249
-        $table_name = 'esp_log';
250
-        $sql = "LOG_ID int(11) NOT NULL AUTO_INCREMENT,
248
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
249
+		$table_name = 'esp_log';
250
+		$sql = "LOG_ID int(11) NOT NULL AUTO_INCREMENT,
251 251
 				LOG_time datetime DEFAULT NULL,
252 252
 				OBJ_ID varchar(45) DEFAULT NULL,
253 253
 				OBJ_type varchar(45) DEFAULT NULL,
@@ -258,18 +258,18 @@  discard block
 block discarded – undo
258 258
 				KEY LOG_time (LOG_time),
259 259
 				KEY OBJ (OBJ_type,OBJ_ID),
260 260
 				KEY LOG_type (LOG_type)";
261
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
262
-        $table_name = 'esp_message_template';
263
-        $sql = "MTP_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
261
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
262
+		$table_name = 'esp_message_template';
263
+		$sql = "MTP_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
264 264
 					GRP_ID int(10) unsigned NOT NULL,
265 265
 					MTP_context varchar(50) NOT NULL,
266 266
 					MTP_template_field varchar(30) NOT NULL,
267 267
 					MTP_content text NOT NULL,
268 268
 					PRIMARY KEY  (MTP_ID),
269 269
 					KEY GRP_ID (GRP_ID)";
270
-        $this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
271
-        $table_name = 'esp_message_template_group';
272
-        $sql = "GRP_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
270
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
271
+		$table_name = 'esp_message_template_group';
272
+		$sql = "GRP_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
273 273
 					MTP_user_id int(10) NOT NULL DEFAULT '1',
274 274
 					MTP_name varchar(245) NOT NULL DEFAULT '',
275 275
 					MTP_description varchar(245) NOT NULL DEFAULT '',
@@ -281,17 +281,17 @@  discard block
 block discarded – undo
281 281
 					MTP_is_active tinyint(1) NOT NULL DEFAULT '1',
282 282
 					PRIMARY KEY  (GRP_ID),
283 283
 					KEY MTP_user_id (MTP_user_id)";
284
-        $this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
285
-        $table_name = 'esp_event_message_template';
286
-        $sql = "EMT_ID bigint(20) unsigned NOT NULL AUTO_INCREMENT,
284
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
285
+		$table_name = 'esp_event_message_template';
286
+		$sql = "EMT_ID bigint(20) unsigned NOT NULL AUTO_INCREMENT,
287 287
 					EVT_ID bigint(20) unsigned NOT NULL DEFAULT 0,
288 288
 					GRP_ID int(10) unsigned NOT NULL DEFAULT 0,
289 289
 					PRIMARY KEY  (EMT_ID),
290 290
 					KEY EVT_ID (EVT_ID),
291 291
 					KEY GRP_ID (GRP_ID)";
292
-        $this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
293
-        $table_name = 'esp_payment';
294
-        $sql = "PAY_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
292
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
293
+		$table_name = 'esp_payment';
294
+		$sql = "PAY_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
295 295
 					TXN_ID int(10) unsigned DEFAULT NULL,
296 296
 					STS_ID varchar(3) collate utf8_bin DEFAULT NULL,
297 297
 					PAY_timestamp datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
@@ -308,9 +308,9 @@  discard block
 block discarded – undo
308 308
 					PRIMARY KEY  (PAY_ID),
309 309
 					KEY PAY_timestamp (PAY_timestamp),
310 310
 					KEY TXN_ID (TXN_ID)";
311
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
312
-        $table_name = 'esp_payment_method';
313
-        $sql = "PMD_ID int(11) NOT NULL AUTO_INCREMENT,
311
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
312
+		$table_name = 'esp_payment_method';
313
+		$sql = "PMD_ID int(11) NOT NULL AUTO_INCREMENT,
314 314
 				PMD_type varchar(124) DEFAULT NULL,
315 315
 				PMD_name varchar(255) DEFAULT NULL,
316 316
 				PMD_desc text,
@@ -326,32 +326,32 @@  discard block
 block discarded – undo
326 326
 				PRIMARY KEY  (PMD_ID),
327 327
 				UNIQUE KEY PMD_slug_UNIQUE (PMD_slug),
328 328
 				KEY PMD_type (PMD_type)";
329
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
330
-        $table_name = "esp_ticket_price";
331
-        $sql = "TKP_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
329
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
330
+		$table_name = "esp_ticket_price";
331
+		$sql = "TKP_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
332 332
 					  TKT_ID int(10) unsigned NOT NULL,
333 333
 					  PRC_ID int(10) unsigned NOT NULL,
334 334
 					  PRIMARY KEY  (TKP_ID),
335 335
 					  KEY TKT_ID (TKT_ID),
336 336
 					  KEY PRC_ID (PRC_ID)";
337
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
338
-        $table_name = "esp_datetime_ticket";
339
-        $sql = "DTK_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
337
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
338
+		$table_name = "esp_datetime_ticket";
339
+		$sql = "DTK_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
340 340
 					  DTT_ID int(10) unsigned NOT NULL,
341 341
 					  TKT_ID int(10) unsigned NOT NULL,
342 342
 					  PRIMARY KEY  (DTK_ID),
343 343
 					  KEY DTT_ID (DTT_ID),
344 344
 					  KEY TKT_ID (TKT_ID)";
345
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
346
-        $table_name = "esp_ticket_template";
347
-        $sql = "TTM_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
345
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
346
+		$table_name = "esp_ticket_template";
347
+		$sql = "TTM_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
348 348
 					  TTM_name varchar(45) NOT NULL,
349 349
 					  TTM_description text,
350 350
 					  TTM_file varchar(45),
351 351
 					  PRIMARY KEY  (TTM_ID)";
352
-        $this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
353
-        $table_name = 'esp_question';
354
-        $sql = 'QST_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
352
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
353
+		$table_name = 'esp_question';
354
+		$sql = 'QST_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
355 355
 					QST_display_text text NOT NULL,
356 356
 					QST_admin_label varchar(255) NOT NULL,
357 357
 					QST_system varchar(25) NOT NULL DEFAULT "",
@@ -365,18 +365,18 @@  discard block
 block discarded – undo
365 365
 					QST_deleted tinyint(2) unsigned NOT NULL DEFAULT 0,
366 366
 					PRIMARY KEY  (QST_ID),
367 367
 					KEY QST_order (QST_order)';
368
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
369
-        $table_name = 'esp_question_group_question';
370
-        $sql = "QGQ_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
368
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
369
+		$table_name = 'esp_question_group_question';
370
+		$sql = "QGQ_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
371 371
 					QSG_ID int(10) unsigned NOT NULL,
372 372
 					QST_ID int(10) unsigned NOT NULL,
373 373
 					QGQ_order int(10) unsigned NOT NULL DEFAULT 0,
374 374
 					PRIMARY KEY  (QGQ_ID),
375 375
 					KEY QST_ID (QST_ID),
376 376
 					KEY QSG_ID_order (QSG_ID,QGQ_order)";
377
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
378
-        $table_name = 'esp_question_option';
379
-        $sql = "QSO_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
377
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
378
+		$table_name = 'esp_question_option';
379
+		$sql = "QSO_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
380 380
 					QSO_value varchar(255) NOT NULL,
381 381
 					QSO_desc text NOT NULL,
382 382
 					QST_ID int(10) unsigned NOT NULL,
@@ -386,9 +386,9 @@  discard block
 block discarded – undo
386 386
 					PRIMARY KEY  (QSO_ID),
387 387
 					KEY QST_ID (QST_ID),
388 388
 					KEY QSO_order (QSO_order)";
389
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
390
-        $table_name = 'esp_registration';
391
-        $sql = "REG_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
389
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
390
+		$table_name = 'esp_registration';
391
+		$sql = "REG_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
392 392
 					  EVT_ID bigint(20) unsigned NOT NULL,
393 393
 					  ATT_ID bigint(20) unsigned NOT NULL,
394 394
 					  TXN_ID int(10) unsigned NOT NULL,
@@ -412,18 +412,18 @@  discard block
 block discarded – undo
412 412
 					  KEY TKT_ID (TKT_ID),
413 413
 					  KEY EVT_ID (EVT_ID),
414 414
 					  KEY STS_ID (STS_ID)";
415
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
416
-        $table_name = 'esp_registration_payment';
417
-        $sql = "RPY_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
415
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
416
+		$table_name = 'esp_registration_payment';
417
+		$sql = "RPY_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
418 418
 					  REG_ID int(10) unsigned NOT NULL,
419 419
 					  PAY_ID int(10) unsigned NULL,
420 420
 					  RPY_amount decimal(10,3) NOT NULL DEFAULT '0.00',
421 421
 					  PRIMARY KEY  (RPY_ID),
422 422
 					  KEY REG_ID (REG_ID),
423 423
 					  KEY PAY_ID (PAY_ID)";
424
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
425
-        $table_name = 'esp_checkin';
426
-        $sql = "CHK_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
424
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
425
+		$table_name = 'esp_checkin';
426
+		$sql = "CHK_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
427 427
 					REG_ID int(10) unsigned NOT NULL,
428 428
 					DTT_ID int(10) unsigned NOT NULL,
429 429
 					CHK_in tinyint(1) unsigned NOT NULL DEFAULT 1,
@@ -431,9 +431,9 @@  discard block
 block discarded – undo
431 431
 					PRIMARY KEY  (CHK_ID),
432 432
 					KEY REG_ID (REG_ID),
433 433
 					KEY DTT_ID (DTT_ID)";
434
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
435
-        $table_name = 'esp_state';
436
-        $sql = "STA_ID smallint(5) unsigned NOT NULL AUTO_INCREMENT,
434
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
435
+		$table_name = 'esp_state';
436
+		$sql = "STA_ID smallint(5) unsigned NOT NULL AUTO_INCREMENT,
437 437
 					  CNT_ISO varchar(2) collate utf8_bin NOT NULL,
438 438
 					  STA_abbrev varchar(24) collate utf8_bin NOT NULL,
439 439
 					  STA_name varchar(100) collate utf8_bin NOT NULL,
@@ -441,9 +441,9 @@  discard block
 block discarded – undo
441 441
 					  PRIMARY KEY  (STA_ID),
442 442
 					  KEY STA_abbrev (STA_abbrev),
443 443
 					  KEY CNT_ISO (CNT_ISO)";
444
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
445
-        $table_name = 'esp_status';
446
-        $sql = "STS_ID varchar(3) NOT NULL,
444
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
445
+		$table_name = 'esp_status';
446
+		$sql = "STS_ID varchar(3) NOT NULL,
447 447
 					  STS_code varchar(45) NOT NULL,
448 448
 					  STS_type varchar(45) NOT NULL,
449 449
 					  STS_can_edit tinyint(1) NOT NULL DEFAULT 0,
@@ -451,9 +451,9 @@  discard block
 block discarded – undo
451 451
 					  STS_open tinyint(1) NOT NULL DEFAULT 1,
452 452
 					  UNIQUE KEY STS_ID_UNIQUE (STS_ID),
453 453
 					  KEY STS_type (STS_type)";
454
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
455
-        $table_name = 'esp_transaction';
456
-        $sql = "TXN_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
454
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
455
+		$table_name = 'esp_transaction';
456
+		$sql = "TXN_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
457 457
 					  TXN_timestamp datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
458 458
 					  TXN_total decimal(10,3) DEFAULT '0.00',
459 459
 					  TXN_paid decimal(10,3) NOT NULL DEFAULT '0.00',
@@ -465,9 +465,9 @@  discard block
 block discarded – undo
465 465
 					  PRIMARY KEY  (TXN_ID),
466 466
 					  KEY TXN_timestamp (TXN_timestamp),
467 467
 					  KEY STS_ID (STS_ID)";
468
-        $this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
469
-        $table_name = 'esp_venue_meta';
470
-        $sql = "VNUM_ID int(11) NOT NULL AUTO_INCREMENT,
468
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
469
+		$table_name = 'esp_venue_meta';
470
+		$sql = "VNUM_ID int(11) NOT NULL AUTO_INCREMENT,
471 471
 			VNU_ID bigint(20) unsigned NOT NULL DEFAULT 0,
472 472
 			VNU_address varchar(255) DEFAULT NULL,
473 473
 			VNU_address2 varchar(255) DEFAULT NULL,
@@ -486,10 +486,10 @@  discard block
 block discarded – undo
486 486
 			KEY VNU_ID (VNU_ID),
487 487
 			KEY STA_ID (STA_ID),
488 488
 			KEY CNT_ISO (CNT_ISO)";
489
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
490
-        //modified tables
491
-        $table_name = "esp_price";
492
-        $sql = "PRC_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
489
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
490
+		//modified tables
491
+		$table_name = "esp_price";
492
+		$sql = "PRC_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
493 493
 					  PRT_ID tinyint(3) unsigned NOT NULL,
494 494
 					  PRC_amount decimal(10,3) NOT NULL DEFAULT '0.00',
495 495
 					  PRC_name varchar(245) NOT NULL,
@@ -502,9 +502,9 @@  discard block
 block discarded – undo
502 502
 					  PRC_parent int(10) unsigned DEFAULT 0,
503 503
 					  PRIMARY KEY  (PRC_ID),
504 504
 					  KEY PRT_ID (PRT_ID)";
505
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
506
-        $table_name = "esp_price_type";
507
-        $sql = "PRT_ID tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
505
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
506
+		$table_name = "esp_price_type";
507
+		$sql = "PRT_ID tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
508 508
 				  PRT_name varchar(45) NOT NULL,
509 509
 				  PBT_ID tinyint(3) unsigned NOT NULL DEFAULT '1',
510 510
 				  PRT_is_percent tinyint(1) NOT NULL DEFAULT '0',
@@ -513,9 +513,9 @@  discard block
 block discarded – undo
513 513
 				  PRT_deleted tinyint(1) NOT NULL DEFAULT '0',
514 514
 				  UNIQUE KEY PRT_name_UNIQUE (PRT_name),
515 515
 				  PRIMARY KEY  (PRT_ID)";
516
-        $this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB ');
517
-        $table_name = "esp_ticket";
518
-        $sql = "TKT_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
516
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB ');
517
+		$table_name = "esp_ticket";
518
+		$sql = "TKT_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
519 519
 					  TTM_ID int(10) unsigned NOT NULL,
520 520
 					  TKT_name varchar(245) NOT NULL DEFAULT '',
521 521
 					  TKT_description text NOT NULL,
@@ -537,9 +537,9 @@  discard block
 block discarded – undo
537 537
 					  TKT_deleted tinyint(1) NOT NULL DEFAULT '0',
538 538
 					  PRIMARY KEY  (TKT_ID),
539 539
 					  KEY TKT_start_date (TKT_start_date)";
540
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
541
-        $table_name = 'esp_question_group';
542
-        $sql = 'QSG_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
540
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
541
+		$table_name = 'esp_question_group';
542
+		$sql = 'QSG_ID int(10) unsigned NOT NULL AUTO_INCREMENT,
543 543
 					QSG_name varchar(255) NOT NULL,
544 544
 					QSG_identifier varchar(100) NOT NULL,
545 545
 					QSG_desc text NULL,
@@ -552,221 +552,221 @@  discard block
 block discarded – undo
552 552
 					PRIMARY KEY  (QSG_ID),
553 553
 					UNIQUE KEY QSG_identifier_UNIQUE (QSG_identifier),
554 554
 					KEY QSG_order (QSG_order)';
555
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
556
-        /** @var EE_DMS_Core_4_1_0 $script_4_1_defaults */
557
-        $script_4_1_defaults = EE_Registry::instance()->load_dms('Core_4_1_0');
558
-        //(because many need to convert old string states to foreign keys into the states table)
559
-        $script_4_1_defaults->insert_default_states();
560
-        $script_4_1_defaults->insert_default_countries();
561
-        /** @var EE_DMS_Core_4_5_0 $script_4_5_defaults */
562
-        $script_4_5_defaults = EE_Registry::instance()->load_dms('Core_4_5_0');
563
-        $script_4_5_defaults->insert_default_price_types();
564
-        $script_4_5_defaults->insert_default_prices();
565
-        $script_4_5_defaults->insert_default_tickets();
566
-        /** @var EE_DMS_Core_4_6_0 $script_4_6_defaults */
567
-        $script_4_6_defaults = EE_Registry::instance()->load_dms('Core_4_6_0');
568
-        $script_4_6_defaults->add_default_admin_only_payments();
569
-        $script_4_6_defaults->insert_default_currencies();
570
-        $this->verify_new_countries();
571
-        $this->verify_new_currencies();
572
-        return true;
573
-    }
555
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
556
+		/** @var EE_DMS_Core_4_1_0 $script_4_1_defaults */
557
+		$script_4_1_defaults = EE_Registry::instance()->load_dms('Core_4_1_0');
558
+		//(because many need to convert old string states to foreign keys into the states table)
559
+		$script_4_1_defaults->insert_default_states();
560
+		$script_4_1_defaults->insert_default_countries();
561
+		/** @var EE_DMS_Core_4_5_0 $script_4_5_defaults */
562
+		$script_4_5_defaults = EE_Registry::instance()->load_dms('Core_4_5_0');
563
+		$script_4_5_defaults->insert_default_price_types();
564
+		$script_4_5_defaults->insert_default_prices();
565
+		$script_4_5_defaults->insert_default_tickets();
566
+		/** @var EE_DMS_Core_4_6_0 $script_4_6_defaults */
567
+		$script_4_6_defaults = EE_Registry::instance()->load_dms('Core_4_6_0');
568
+		$script_4_6_defaults->add_default_admin_only_payments();
569
+		$script_4_6_defaults->insert_default_currencies();
570
+		$this->verify_new_countries();
571
+		$this->verify_new_currencies();
572
+		return true;
573
+	}
574 574
 
575 575
 
576 576
 
577
-    /**
578
-     * @return boolean
579
-     */
580
-    public function schema_changes_after_migration()
581
-    {
582
-        $this->fix_non_default_taxes();
583
-        //this is actually the same as the last DMS
584
-        /** @var EE_DMS_Core_4_7_0 $script_4_7_defaults */
585
-        $script_4_7_defaults = EE_Registry::instance()->load_dms('Core_4_7_0');
586
-        return $script_4_7_defaults->schema_changes_after_migration();
587
-    }
577
+	/**
578
+	 * @return boolean
579
+	 */
580
+	public function schema_changes_after_migration()
581
+	{
582
+		$this->fix_non_default_taxes();
583
+		//this is actually the same as the last DMS
584
+		/** @var EE_DMS_Core_4_7_0 $script_4_7_defaults */
585
+		$script_4_7_defaults = EE_Registry::instance()->load_dms('Core_4_7_0');
586
+		return $script_4_7_defaults->schema_changes_after_migration();
587
+	}
588 588
 
589 589
 
590 590
 
591
-    public function migration_page_hooks()
592
-    {
593
-    }
591
+	public function migration_page_hooks()
592
+	{
593
+	}
594 594
 
595 595
 
596 596
 
597
-    /**
598
-     * verifies each of the new countries exists that somehow we missed in 4.1
599
-     */
600
-    public function verify_new_countries()
601
-    {
602
-        //a list of countries (and specifically some which were missed in another list):https://gist.github.com/adhipg/1600028
603
-        //how many decimal places? https://en.wikipedia.org/wiki/ISO_4217
604
-        //currency symbols: http://www.xe.com/symbols.php
605
-        //CNT_ISO, CNT_ISO3, RGN_ID, CNT_name, CNT_cur_code, CNT_cur_single, CNT_cur_plural, CNT_cur_sign, CNT_cur_sign_b4, CNT_cur_dec_plc, CNT_tel_code, CNT_is_EU, CNT_active
606
-        //('AD', 'AND', 0, 'Andorra', 'EUR', 'Euro', 'Euros', '€', 1, 2, '+376', 0, 0),
607
-        $newer_countries = array(
608
-            array('AX', 'ALA', 0, '&#197;land Islands', 'EUR', 'Euro', 'Euros', '€', 1, 2, '+358', 1, 0),
609
-            array('BL', 'BLM', 0, 'Saint Barthelemy', 'EUR', 'Euro', 'Euros', '€', 1, 2, '+590', 1, 0),
610
-            array('CW', 'CUW', 0, 'Curacao', 'ANG', 'Guilder', 'Guilders', 'ƒ', 1, 2, '+599', 1, 0),
611
-            array('GG', 'GGY', 0, 'Guernsey', 'EUR', 'Euro', 'Euros', '€', 1, 2, '+44', 0, 0),
612
-            array('IM', 'IMN', 0, 'Isle of Man', 'GBP', 'Pound', 'Pounds', '£', 1, 2, '+44', 0, 0),
613
-            array('JE', 'JEY', 0, 'Jersey', 'GBP', 'Pound', 'Pounds', '£', 1, 2, '+44', 0, 0),
614
-            array('MF', 'MAF', 0, 'Saint Martin', 'EUR', 'Euro', 'Euros', '€', 1, 2, '+590', 1, 0),
615
-            array('ME', 'MNE', 0, 'Montenegro', 'EUR', 'Euro', 'Euros', '€', 1, 2, '+382', 0, 0),
616
-            array('RS', 'SRB', 0, 'Serbia', 'RSD', 'Dinar', 'Dinars', '', 0, 2, '+381', 1, 0),
617
-            array('SS', 'SSD', 0, 'South Sudan', 'SSP', 'Pound', 'Pounds', '£', 1, 2, '+211', 0, 0),
618
-            array('SX', 'SXM', 0, 'Sint Maarten', 'ANG', 'Guilder', 'Guilders', 'ƒ', 1, 2, '+1', 1, 0),
619
-            array('XK', 'XKX', 0, 'Kosovo', 'EUR', 'Euro', 'Euros', '€', 1, 2, '+383', 0, 0),
620
-            array('YT', 'MYT', 0, 'Mayotte', 'EUR', 'Euro', 'Euros', '€', 0, 2, '+262', 1, 0),
621
-            array(
622
-                'BQ',
623
-                'BES',
624
-                0,
625
-                'Bonaire, Saint Eustatius and Saba',
626
-                'USD',
627
-                'Dollar',
628
-                'Dollars',
629
-                '$',
630
-                1,
631
-                2,
632
-                '+599',
633
-                0,
634
-                0,
635
-            ),
636
-            array('BV', 'BVT', 0, 'Bouvet Island', 'NOK', 'Krone', 'Krones', 'kr', 1, 2, '+47', 0, 0),
637
-            array('IO', 'IOT', 0, 'British Indian Ocean Territory', 'GBP', 'Pound', 'Pounds', '£', 1, 2, '+246', 0, 0),
638
-            array('CX', 'CXR', 0, 'Christmas Island', 'AUD', 'Dollar', 'Dollars', '$', 1, 2, '+61', 0, 0),
639
-            array('CC', 'CCK', 0, 'Cocos (Keeling) Islands', 'AUD', 'Dollar', 'Dollars', '$', 1, 2, '+891', 0, 0),
640
-            array(
641
-                'HM',
642
-                'HMD',
643
-                0,
644
-                'Heard Island and McDonald Islands',
645
-                'AUD',
646
-                'Dollar',
647
-                'Dollars',
648
-                '$',
649
-                1,
650
-                2,
651
-                '+891',
652
-                0,
653
-                0,
654
-            ),
655
-            array('PS', 'PSE', 0, 'Palestinian Territory', 'ILS', 'Shekel', 'Shekels', '₪', 1, 2, '+970', 0, 0),
656
-            array(
657
-                'GS',
658
-                'SGS',
659
-                0,
660
-                'South Georgia and the South Sandwich Islands',
661
-                'GBP',
662
-                'Pound',
663
-                'Pounds',
664
-                '£',
665
-                1,
666
-                2,
667
-                '+500',
668
-                0,
669
-                0,
670
-            ),
671
-            array('TL', 'TLS', 0, 'Timor-Leste', 'USD', 'Dollar', 'Dollars', '$', 1, 2, '+670', 0, 0),
672
-            array('TF', 'ATF', 0, 'French Southern Territories', 'EUR', 'Euro', 'Euros', '€', 1, 2, '+262', 0, 0),
673
-            array(
674
-                'UM',
675
-                'UMI',
676
-                0,
677
-                'United States Minor Outlying Islands',
678
-                'USD',
679
-                'Dollar',
680
-                'Dollars',
681
-                '$',
682
-                1,
683
-                2,
684
-                '+1',
685
-                0,
686
-                0,
687
-            ),
688
-        );
689
-        global $wpdb;
690
-        $country_table = $wpdb->prefix . "esp_country";
691
-        $country_format = array(
692
-            "CNT_ISO"         => '%s',
693
-            "CNT_ISO3"        => '%s',
694
-            "RGN_ID"          => '%d',
695
-            "CNT_name"        => '%s',
696
-            "CNT_cur_code"    => '%s',
697
-            "CNT_cur_single"  => '%s',
698
-            "CNT_cur_plural"  => '%s',
699
-            "CNT_cur_sign"    => '%s',
700
-            "CNT_cur_sign_b4" => '%d',
701
-            "CNT_cur_dec_plc" => '%d',
702
-            "CNT_tel_code"    => '%s',
703
-            "CNT_is_EU"       => '%d',
704
-            "CNT_active"      => '%d',
705
-        );
706
-        if ($this->_get_table_analysis()->tableExists($country_table)) {
707
-            foreach ($newer_countries as $country) {
708
-                $SQL = "SELECT COUNT('CNT_ISO') FROM {$country_table} WHERE CNT_ISO='{$country[0]}' LIMIT 1";
709
-                $countries = $wpdb->get_var($SQL);
710
-                if ( ! $countries) {
711
-                    $wpdb->insert($country_table,
712
-                        array_combine(array_keys($country_format), $country),
713
-                        $country_format
714
-                    );
715
-                }
716
-            }
717
-        }
718
-    }
597
+	/**
598
+	 * verifies each of the new countries exists that somehow we missed in 4.1
599
+	 */
600
+	public function verify_new_countries()
601
+	{
602
+		//a list of countries (and specifically some which were missed in another list):https://gist.github.com/adhipg/1600028
603
+		//how many decimal places? https://en.wikipedia.org/wiki/ISO_4217
604
+		//currency symbols: http://www.xe.com/symbols.php
605
+		//CNT_ISO, CNT_ISO3, RGN_ID, CNT_name, CNT_cur_code, CNT_cur_single, CNT_cur_plural, CNT_cur_sign, CNT_cur_sign_b4, CNT_cur_dec_plc, CNT_tel_code, CNT_is_EU, CNT_active
606
+		//('AD', 'AND', 0, 'Andorra', 'EUR', 'Euro', 'Euros', '€', 1, 2, '+376', 0, 0),
607
+		$newer_countries = array(
608
+			array('AX', 'ALA', 0, '&#197;land Islands', 'EUR', 'Euro', 'Euros', '€', 1, 2, '+358', 1, 0),
609
+			array('BL', 'BLM', 0, 'Saint Barthelemy', 'EUR', 'Euro', 'Euros', '€', 1, 2, '+590', 1, 0),
610
+			array('CW', 'CUW', 0, 'Curacao', 'ANG', 'Guilder', 'Guilders', 'ƒ', 1, 2, '+599', 1, 0),
611
+			array('GG', 'GGY', 0, 'Guernsey', 'EUR', 'Euro', 'Euros', '€', 1, 2, '+44', 0, 0),
612
+			array('IM', 'IMN', 0, 'Isle of Man', 'GBP', 'Pound', 'Pounds', '£', 1, 2, '+44', 0, 0),
613
+			array('JE', 'JEY', 0, 'Jersey', 'GBP', 'Pound', 'Pounds', '£', 1, 2, '+44', 0, 0),
614
+			array('MF', 'MAF', 0, 'Saint Martin', 'EUR', 'Euro', 'Euros', '€', 1, 2, '+590', 1, 0),
615
+			array('ME', 'MNE', 0, 'Montenegro', 'EUR', 'Euro', 'Euros', '€', 1, 2, '+382', 0, 0),
616
+			array('RS', 'SRB', 0, 'Serbia', 'RSD', 'Dinar', 'Dinars', '', 0, 2, '+381', 1, 0),
617
+			array('SS', 'SSD', 0, 'South Sudan', 'SSP', 'Pound', 'Pounds', '£', 1, 2, '+211', 0, 0),
618
+			array('SX', 'SXM', 0, 'Sint Maarten', 'ANG', 'Guilder', 'Guilders', 'ƒ', 1, 2, '+1', 1, 0),
619
+			array('XK', 'XKX', 0, 'Kosovo', 'EUR', 'Euro', 'Euros', '€', 1, 2, '+383', 0, 0),
620
+			array('YT', 'MYT', 0, 'Mayotte', 'EUR', 'Euro', 'Euros', '€', 0, 2, '+262', 1, 0),
621
+			array(
622
+				'BQ',
623
+				'BES',
624
+				0,
625
+				'Bonaire, Saint Eustatius and Saba',
626
+				'USD',
627
+				'Dollar',
628
+				'Dollars',
629
+				'$',
630
+				1,
631
+				2,
632
+				'+599',
633
+				0,
634
+				0,
635
+			),
636
+			array('BV', 'BVT', 0, 'Bouvet Island', 'NOK', 'Krone', 'Krones', 'kr', 1, 2, '+47', 0, 0),
637
+			array('IO', 'IOT', 0, 'British Indian Ocean Territory', 'GBP', 'Pound', 'Pounds', '£', 1, 2, '+246', 0, 0),
638
+			array('CX', 'CXR', 0, 'Christmas Island', 'AUD', 'Dollar', 'Dollars', '$', 1, 2, '+61', 0, 0),
639
+			array('CC', 'CCK', 0, 'Cocos (Keeling) Islands', 'AUD', 'Dollar', 'Dollars', '$', 1, 2, '+891', 0, 0),
640
+			array(
641
+				'HM',
642
+				'HMD',
643
+				0,
644
+				'Heard Island and McDonald Islands',
645
+				'AUD',
646
+				'Dollar',
647
+				'Dollars',
648
+				'$',
649
+				1,
650
+				2,
651
+				'+891',
652
+				0,
653
+				0,
654
+			),
655
+			array('PS', 'PSE', 0, 'Palestinian Territory', 'ILS', 'Shekel', 'Shekels', '₪', 1, 2, '+970', 0, 0),
656
+			array(
657
+				'GS',
658
+				'SGS',
659
+				0,
660
+				'South Georgia and the South Sandwich Islands',
661
+				'GBP',
662
+				'Pound',
663
+				'Pounds',
664
+				'£',
665
+				1,
666
+				2,
667
+				'+500',
668
+				0,
669
+				0,
670
+			),
671
+			array('TL', 'TLS', 0, 'Timor-Leste', 'USD', 'Dollar', 'Dollars', '$', 1, 2, '+670', 0, 0),
672
+			array('TF', 'ATF', 0, 'French Southern Territories', 'EUR', 'Euro', 'Euros', '€', 1, 2, '+262', 0, 0),
673
+			array(
674
+				'UM',
675
+				'UMI',
676
+				0,
677
+				'United States Minor Outlying Islands',
678
+				'USD',
679
+				'Dollar',
680
+				'Dollars',
681
+				'$',
682
+				1,
683
+				2,
684
+				'+1',
685
+				0,
686
+				0,
687
+			),
688
+		);
689
+		global $wpdb;
690
+		$country_table = $wpdb->prefix . "esp_country";
691
+		$country_format = array(
692
+			"CNT_ISO"         => '%s',
693
+			"CNT_ISO3"        => '%s',
694
+			"RGN_ID"          => '%d',
695
+			"CNT_name"        => '%s',
696
+			"CNT_cur_code"    => '%s',
697
+			"CNT_cur_single"  => '%s',
698
+			"CNT_cur_plural"  => '%s',
699
+			"CNT_cur_sign"    => '%s',
700
+			"CNT_cur_sign_b4" => '%d',
701
+			"CNT_cur_dec_plc" => '%d',
702
+			"CNT_tel_code"    => '%s',
703
+			"CNT_is_EU"       => '%d',
704
+			"CNT_active"      => '%d',
705
+		);
706
+		if ($this->_get_table_analysis()->tableExists($country_table)) {
707
+			foreach ($newer_countries as $country) {
708
+				$SQL = "SELECT COUNT('CNT_ISO') FROM {$country_table} WHERE CNT_ISO='{$country[0]}' LIMIT 1";
709
+				$countries = $wpdb->get_var($SQL);
710
+				if ( ! $countries) {
711
+					$wpdb->insert($country_table,
712
+						array_combine(array_keys($country_format), $country),
713
+						$country_format
714
+					);
715
+				}
716
+			}
717
+		}
718
+	}
719 719
 
720 720
 
721 721
 
722
-    /**
723
-     * verifies each of the new currencies exists that somehow we missed in 4.6
724
-     */
725
-    public function verify_new_currencies()
726
-    {
727
-        //a list of countries (and specifically some which were missed in another list):https://gist.github.com/adhipg/1600028
728
-        //how many decimal places? https://en.wikipedia.org/wiki/ISO_4217
729
-        //currency symbols: http://www.xe.com/symbols.php
730
-        // CUR_code, CUR_single, CUR_plural, CUR_sign, CUR_dec_plc, CUR_active
731
-        //( 'EUR',  'Euro',  'Euros',  '€',  2,1),
732
-        $newer_currencies = array(
733
-            array('RSD', 'Dinar', 'Dinars', '', 3, 1),
734
-        );
735
-        global $wpdb;
736
-        $currency_table = $wpdb->prefix . "esp_currency";
737
-        $currency_format = array(
738
-            "CUR_code"    => '%s',
739
-            "CUR_single"  => '%s',
740
-            "CUR_plural"  => '%s',
741
-            "CUR_sign"    => '%s',
742
-            "CUR_dec_plc" => '%d',
743
-            "CUR_active"  => '%d',
744
-        );
745
-        if ($this->_get_table_analysis()->tableExists($currency_table)) {
746
-            foreach ($newer_currencies as $currency) {
747
-                $SQL = "SELECT COUNT('CUR_code') FROM {$currency_table} WHERE CUR_code='{$currency[0]}' LIMIT 1";
748
-                $countries = $wpdb->get_var($SQL);
749
-                if ( ! $countries) {
750
-                    $wpdb->insert($currency_table,
751
-                        array_combine(array_keys($currency_format), $currency),
752
-                        $currency_format
753
-                    );
754
-                }
755
-            }
756
-        }
757
-    }
722
+	/**
723
+	 * verifies each of the new currencies exists that somehow we missed in 4.6
724
+	 */
725
+	public function verify_new_currencies()
726
+	{
727
+		//a list of countries (and specifically some which were missed in another list):https://gist.github.com/adhipg/1600028
728
+		//how many decimal places? https://en.wikipedia.org/wiki/ISO_4217
729
+		//currency symbols: http://www.xe.com/symbols.php
730
+		// CUR_code, CUR_single, CUR_plural, CUR_sign, CUR_dec_plc, CUR_active
731
+		//( 'EUR',  'Euro',  'Euros',  '€',  2,1),
732
+		$newer_currencies = array(
733
+			array('RSD', 'Dinar', 'Dinars', '', 3, 1),
734
+		);
735
+		global $wpdb;
736
+		$currency_table = $wpdb->prefix . "esp_currency";
737
+		$currency_format = array(
738
+			"CUR_code"    => '%s',
739
+			"CUR_single"  => '%s',
740
+			"CUR_plural"  => '%s',
741
+			"CUR_sign"    => '%s',
742
+			"CUR_dec_plc" => '%d',
743
+			"CUR_active"  => '%d',
744
+		);
745
+		if ($this->_get_table_analysis()->tableExists($currency_table)) {
746
+			foreach ($newer_currencies as $currency) {
747
+				$SQL = "SELECT COUNT('CUR_code') FROM {$currency_table} WHERE CUR_code='{$currency[0]}' LIMIT 1";
748
+				$countries = $wpdb->get_var($SQL);
749
+				if ( ! $countries) {
750
+					$wpdb->insert($currency_table,
751
+						array_combine(array_keys($currency_format), $currency),
752
+						$currency_format
753
+					);
754
+				}
755
+			}
756
+		}
757
+	}
758 758
 
759 759
 
760 760
 
761
-    /**
762
-     * addresses https://events.codebasehq.com/projects/event-espresso/tickets/8731
763
-     * which should just be a temporary issue for folks who installed 4.8.0-4.8.5;
764
-     * we should be able to stop doing this in 4.9
765
-     */
766
-    public function fix_non_default_taxes()
767
-    {
768
-        global $wpdb;
769
-        $query = $wpdb->prepare("UPDATE
761
+	/**
762
+	 * addresses https://events.codebasehq.com/projects/event-espresso/tickets/8731
763
+	 * which should just be a temporary issue for folks who installed 4.8.0-4.8.5;
764
+	 * we should be able to stop doing this in 4.9
765
+	 */
766
+	public function fix_non_default_taxes()
767
+	{
768
+		global $wpdb;
769
+		$query = $wpdb->prepare("UPDATE
770 770
 				{$wpdb->prefix}esp_price p INNER JOIN
771 771
 				{$wpdb->prefix}esp_price_type pt ON p.PRT_ID = pt.PRT_ID
772 772
 			SET
@@ -775,6 +775,6 @@  discard block
 block discarded – undo
775 775
 				p.PRC_is_default = 0 AND
776 776
 				pt.PBT_ID = %d
777 777
 					", EEM_Price_Type::base_type_tax);
778
-        $wpdb->query($query);
779
-    }
778
+		$wpdb->query($query);
779
+	}
780 780
 }
Please login to merge, or discard this patch.
core/data_migration_scripts/EE_DMS_Core_4_5_0.dms.php 2 patches
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 //unfortunately, this needs to be done upon INCLUSION of this file,
14 14
 //instead of construction, because it only gets constructed on first page load
15 15
 //(all other times it gets resurrected from a wordpress option)
16
-$stages = glob(EE_CORE . 'data_migration_scripts/4_5_0_stages/*');
16
+$stages = glob(EE_CORE.'data_migration_scripts/4_5_0_stages/*');
17 17
 $class_to_filepath = array();
18 18
 foreach ($stages as $filepath) {
19 19
     $matches = array();
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
         } elseif ( ! $version_string) {
63 63
 //			echo "no version string provided: $version_string";
64 64
             //no version string provided... this must be pre 4.3
65
-            return false;//changed mind. dont want people thinking they should migrate yet because they cant
65
+            return false; //changed mind. dont want people thinking they should migrate yet because they cant
66 66
         } else {
67 67
 //			echo "$version_string doesnt apply";
68 68
             return false;
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
     public function schema_changes_before_migration()
82 82
     {
83 83
         //relies on 4.1's EEH_Activation::create_table
84
-        require_once(EE_HELPERS . 'EEH_Activation.helper.php');
84
+        require_once(EE_HELPERS.'EEH_Activation.helper.php');
85 85
         $table_name = 'esp_answer';
86 86
         $sql = " ANS_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
87 87
 					REG_ID INT UNSIGNED NOT NULL,
@@ -486,18 +486,18 @@  discard block
 block discarded – undo
486 486
     public function insert_default_price_types()
487 487
     {
488 488
         global $wpdb;
489
-        $price_type_table = $wpdb->prefix . "esp_price_type";
489
+        $price_type_table = $wpdb->prefix."esp_price_type";
490 490
         if ($this->_get_table_analysis()->tableExists($price_type_table)) {
491
-            $SQL = 'SELECT COUNT(PRT_ID) FROM ' . $price_type_table;
491
+            $SQL = 'SELECT COUNT(PRT_ID) FROM '.$price_type_table;
492 492
             $price_types_exist = $wpdb->get_var($SQL);
493 493
             if ( ! $price_types_exist) {
494 494
                 $user_id = EEH_Activation::get_default_creator_id();
495 495
                 $SQL = "INSERT INTO $price_type_table ( PRT_ID, PRT_name, PBT_ID, PRT_is_percent, PRT_order, PRT_wp_user, PRT_deleted ) VALUES
496
-							(1, '" . __('Base Price', 'event_espresso') . "', 1,  0, 0, $user_id, 0),
497
-							(2, '" . __('Percent Discount', 'event_espresso') . "', 2,  1, 20, $user_id, 0),
498
-							(3, '" . __('Dollar Discount', 'event_espresso') . "', 2,  0, 30, $user_id, 0),
499
-							(4, '" . __('Percent Surcharge', 'event_espresso') . "', 3,  1, 40, $user_id,  0),
500
-							(5, '" . __('Dollar Surcharge', 'event_espresso') . "', 3,  0, 50, $user_id, 0);";
496
+							(1, '".__('Base Price', 'event_espresso')."', 1,  0, 0, $user_id, 0),
497
+							(2, '".__('Percent Discount', 'event_espresso')."', 2,  1, 20, $user_id, 0),
498
+							(3, '".__('Dollar Discount', 'event_espresso')."', 2,  0, 30, $user_id, 0),
499
+							(4, '".__('Percent Surcharge', 'event_espresso')."', 3,  1, 40, $user_id,  0),
500
+							(5, '".__('Dollar Surcharge', 'event_espresso')."', 3,  0, 50, $user_id, 0);";
501 501
                 $SQL = apply_filters('FHEE__EE_DMS_4_5_0__insert_default_price_types__SQL', $SQL);
502 502
                 $wpdb->query($SQL);
503 503
             }
@@ -518,9 +518,9 @@  discard block
 block discarded – undo
518 518
     public function insert_default_prices()
519 519
     {
520 520
         global $wpdb;
521
-        $price_table = $wpdb->prefix . "esp_price";
521
+        $price_table = $wpdb->prefix."esp_price";
522 522
         if ($this->_get_table_analysis()->tableExists($price_table)) {
523
-            $SQL = 'SELECT COUNT(PRC_ID) FROM ' . $price_table;
523
+            $SQL = 'SELECT COUNT(PRC_ID) FROM '.$price_table;
524 524
             $prices_exist = $wpdb->get_var($SQL);
525 525
             if ( ! $prices_exist) {
526 526
                 $user_id = EEH_Activation::get_default_creator_id();
@@ -545,9 +545,9 @@  discard block
 block discarded – undo
545 545
     public function insert_default_tickets()
546 546
     {
547 547
         global $wpdb;
548
-        $ticket_table = $wpdb->prefix . "esp_ticket";
548
+        $ticket_table = $wpdb->prefix."esp_ticket";
549 549
         if ($this->_get_table_analysis()->tableExists($ticket_table)) {
550
-            $SQL = 'SELECT COUNT(TKT_ID) FROM ' . $ticket_table;
550
+            $SQL = 'SELECT COUNT(TKT_ID) FROM '.$ticket_table;
551 551
             $tickets_exist = $wpdb->get_var($SQL);
552 552
             if ( ! $tickets_exist) {
553 553
                 $user_id = EEH_Activation::get_default_creator_id();
@@ -560,9 +560,9 @@  discard block
 block discarded – undo
560 560
                 $wpdb->query($SQL);
561 561
             }
562 562
         }
563
-        $ticket_price_table = $wpdb->prefix . "esp_ticket_price";
563
+        $ticket_price_table = $wpdb->prefix."esp_ticket_price";
564 564
         if ($this->_get_table_analysis()->tableExists($ticket_price_table)) {
565
-            $SQL = 'SELECT COUNT(TKP_ID) FROM ' . $ticket_price_table;
565
+            $SQL = 'SELECT COUNT(TKP_ID) FROM '.$ticket_price_table;
566 566
             $ticket_prc_exist = $wpdb->get_var($SQL);
567 567
             if ( ! $ticket_prc_exist) {
568 568
                 $SQL = "INSERT INTO $ticket_price_table
Please login to merge, or discard this patch.
Indentation   +247 added lines, -247 removed lines patch added patch discarded remove patch
@@ -16,9 +16,9 @@  discard block
 block discarded – undo
16 16
 $stages = glob(EE_CORE . 'data_migration_scripts/4_5_0_stages/*');
17 17
 $class_to_filepath = array();
18 18
 foreach ($stages as $filepath) {
19
-    $matches = array();
20
-    preg_match('~4_5_0_stages/(.*).dmsstage.php~', $filepath, $matches);
21
-    $class_to_filepath[$matches[1]] = $filepath;
19
+	$matches = array();
20
+	preg_match('~4_5_0_stages/(.*).dmsstage.php~', $filepath, $matches);
21
+	$class_to_filepath[$matches[1]] = $filepath;
22 22
 }
23 23
 //give addons a chance to autoload their stages too
24 24
 $class_to_filepath = apply_filters('FHEE__EE_DMS_4_5_0__autoloaded_stages', $class_to_filepath);
@@ -31,59 +31,59 @@  discard block
 block discarded – undo
31 31
 
32 32
 
33 33
 
34
-    /**
35
-     * EE_DMS_Core_4_5_0 constructor.
36
-     *
37
-     * @param TableManager  $table_manager
38
-     * @param TableAnalysis $table_analysis
39
-     */
40
-    public function __construct(TableManager $table_manager = null, TableAnalysis $table_analysis = null)
41
-    {
42
-        $this->_pretty_name = __("Data Update to Event Espresso 4.5.0", "event_espresso");
43
-        $this->_priority = 10;
44
-        $this->_migration_stages = array(
45
-            new EE_DMS_4_5_0_update_wp_user_for_tickets(),
46
-            new EE_DMS_4_5_0_update_wp_user_for_prices(),
47
-            new EE_DMS_4_5_0_update_wp_user_for_price_types(),
48
-            new EE_DMS_4_5_0_update_wp_user_for_question_groups(),
49
-            new EE_DMS_4_5_0_invoice_settings(),
50
-        );
51
-        parent::__construct($table_manager, $table_analysis);
52
-    }
53
-
54
-
55
-
56
-    public function can_migrate_from_version($version_array)
57
-    {
58
-        $version_string = $version_array['Core'];
59
-        if (version_compare($version_string, '4.5.0', '<=') && version_compare($version_string, '4.3.0', '>=')) {
34
+	/**
35
+	 * EE_DMS_Core_4_5_0 constructor.
36
+	 *
37
+	 * @param TableManager  $table_manager
38
+	 * @param TableAnalysis $table_analysis
39
+	 */
40
+	public function __construct(TableManager $table_manager = null, TableAnalysis $table_analysis = null)
41
+	{
42
+		$this->_pretty_name = __("Data Update to Event Espresso 4.5.0", "event_espresso");
43
+		$this->_priority = 10;
44
+		$this->_migration_stages = array(
45
+			new EE_DMS_4_5_0_update_wp_user_for_tickets(),
46
+			new EE_DMS_4_5_0_update_wp_user_for_prices(),
47
+			new EE_DMS_4_5_0_update_wp_user_for_price_types(),
48
+			new EE_DMS_4_5_0_update_wp_user_for_question_groups(),
49
+			new EE_DMS_4_5_0_invoice_settings(),
50
+		);
51
+		parent::__construct($table_manager, $table_analysis);
52
+	}
53
+
54
+
55
+
56
+	public function can_migrate_from_version($version_array)
57
+	{
58
+		$version_string = $version_array['Core'];
59
+		if (version_compare($version_string, '4.5.0', '<=') && version_compare($version_string, '4.3.0', '>=')) {
60 60
 //			echo "$version_string can be migrated from";
61
-            return true;
62
-        } elseif ( ! $version_string) {
61
+			return true;
62
+		} elseif ( ! $version_string) {
63 63
 //			echo "no version string provided: $version_string";
64
-            //no version string provided... this must be pre 4.3
65
-            return false;//changed mind. dont want people thinking they should migrate yet because they cant
66
-        } else {
64
+			//no version string provided... this must be pre 4.3
65
+			return false;//changed mind. dont want people thinking they should migrate yet because they cant
66
+		} else {
67 67
 //			echo "$version_string doesnt apply";
68
-            return false;
69
-        }
70
-    }
68
+			return false;
69
+		}
70
+	}
71 71
 
72 72
 
73 73
 
74
-    public function schema_changes_before_migration()
75
-    {
76
-        //relies on 4.1's EEH_Activation::create_table
77
-        require_once(EE_HELPERS . 'EEH_Activation.helper.php');
78
-        $table_name = 'esp_answer';
79
-        $sql = " ANS_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
74
+	public function schema_changes_before_migration()
75
+	{
76
+		//relies on 4.1's EEH_Activation::create_table
77
+		require_once(EE_HELPERS . 'EEH_Activation.helper.php');
78
+		$table_name = 'esp_answer';
79
+		$sql = " ANS_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
80 80
 					REG_ID INT UNSIGNED NOT NULL,
81 81
 					QST_ID INT UNSIGNED NOT NULL,
82 82
 					ANS_value TEXT NOT NULL,
83 83
 					PRIMARY KEY  (ANS_ID)";
84
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
85
-        $table_name = 'esp_attendee_meta';
86
-        $sql = "ATTM_ID INT(10) UNSIGNED NOT	NULL AUTO_INCREMENT,
84
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
85
+		$table_name = 'esp_attendee_meta';
86
+		$sql = "ATTM_ID INT(10) UNSIGNED NOT	NULL AUTO_INCREMENT,
87 87
 						ATT_ID BIGINT(20) UNSIGNED NOT NULL,
88 88
 						ATT_fname VARCHAR(45) NOT NULL,
89 89
 						ATT_lname VARCHAR(45) NOT	NULL,
@@ -99,9 +99,9 @@  discard block
 block discarded – undo
99 99
 								KEY ATT_fname (ATT_fname),
100 100
 								KEY ATT_lname (ATT_lname),
101 101
 								KEY ATT_email (ATT_email)";
102
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
103
-        $table_name = 'esp_country';
104
-        $sql = "CNT_ISO VARCHAR(2) COLLATE utf8_bin NOT NULL,
102
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
103
+		$table_name = 'esp_country';
104
+		$sql = "CNT_ISO VARCHAR(2) COLLATE utf8_bin NOT NULL,
105 105
 					  CNT_ISO3 VARCHAR(3) COLLATE utf8_bin NOT NULL,
106 106
 					  RGN_ID TINYINT(3) UNSIGNED DEFAULT NULL,
107 107
 					  CNT_name VARCHAR(45) COLLATE utf8_bin NOT NULL,
@@ -117,9 +117,9 @@  discard block
 block discarded – undo
117 117
 					  CNT_is_EU TINYINT(1) DEFAULT '0',
118 118
 					  CNT_active TINYINT(1) DEFAULT '0',
119 119
 					  PRIMARY KEY  (CNT_ISO)";
120
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
121
-        $table_name = 'esp_datetime';
122
-        $sql = "DTT_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
120
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
121
+		$table_name = 'esp_datetime';
122
+		$sql = "DTT_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
123 123
 				  EVT_ID BIGINT(20) UNSIGNED NOT NULL,
124 124
 				  DTT_name VARCHAR(255) NOT NULL DEFAULT '',
125 125
 				  DTT_description TEXT NOT NULL,
@@ -134,9 +134,9 @@  discard block
 block discarded – undo
134 134
 						PRIMARY KEY  (DTT_ID),
135 135
 						KEY EVT_ID (EVT_ID),
136 136
 						KEY DTT_is_primary (DTT_is_primary)";
137
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
138
-        $table_name = 'esp_event_meta';
139
-        $sql = "
137
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
138
+		$table_name = 'esp_event_meta';
139
+		$sql = "
140 140
 			EVTM_ID INT NOT NULL AUTO_INCREMENT,
141 141
 			EVT_ID BIGINT(20) UNSIGNED NOT NULL,
142 142
 			EVT_display_desc TINYINT(1) UNSIGNED NOT NULL DEFAULT 1,
@@ -151,31 +151,31 @@  discard block
 block discarded – undo
151 151
 			EVT_external_URL VARCHAR(200) NULL,
152 152
 			EVT_donations TINYINT(1) NULL,
153 153
 			PRIMARY KEY  (EVTM_ID)";
154
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
155
-        $table_name = 'esp_event_question_group';
156
-        $sql = "EQG_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
154
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
155
+		$table_name = 'esp_event_question_group';
156
+		$sql = "EQG_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
157 157
 					EVT_ID BIGINT(20) UNSIGNED NOT NULL,
158 158
 					QSG_ID INT UNSIGNED NOT NULL,
159 159
 					EQG_primary TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
160 160
 					PRIMARY KEY  (EQG_ID)";
161
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
162
-        $table_name = 'esp_event_venue';
163
-        $sql = "EVV_ID INT(11) NOT NULL AUTO_INCREMENT,
161
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
162
+		$table_name = 'esp_event_venue';
163
+		$sql = "EVV_ID INT(11) NOT NULL AUTO_INCREMENT,
164 164
 				EVT_ID BIGINT(20) UNSIGNED NOT NULL,
165 165
 				VNU_ID BIGINT(20) UNSIGNED NOT NULL,
166 166
 				EVV_primary TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
167 167
 				PRIMARY KEY  (EVV_ID)";
168
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
169
-        $table_name = 'esp_extra_meta';
170
-        $sql = "EXM_ID INT(11) NOT NULL AUTO_INCREMENT,
168
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
169
+		$table_name = 'esp_extra_meta';
170
+		$sql = "EXM_ID INT(11) NOT NULL AUTO_INCREMENT,
171 171
 				OBJ_ID INT(11) DEFAULT NULL,
172 172
 				EXM_type VARCHAR(45) DEFAULT NULL,
173 173
 				EXM_key VARCHAR(45) DEFAULT NULL,
174 174
 				EXM_value TEXT,
175 175
 				PRIMARY KEY  (EXM_ID)";
176
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
177
-        $table_name = 'esp_line_item';
178
-        $sql = "LIN_ID INT(11) NOT NULL AUTO_INCREMENT,
176
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
177
+		$table_name = 'esp_line_item';
178
+		$sql = "LIN_ID INT(11) NOT NULL AUTO_INCREMENT,
179 179
 				LIN_code VARCHAR(245) NOT NULL DEFAULT '',
180 180
 				TXN_ID INT(11) DEFAULT NULL,
181 181
 				LIN_name VARCHAR(245) NOT NULL DEFAULT '',
@@ -191,19 +191,19 @@  discard block
 block discarded – undo
191 191
 				OBJ_ID INT(11) DEFAULT NULL,
192 192
 				OBJ_type VARCHAR(45)DEFAULT NULL,
193 193
 				PRIMARY KEY  (LIN_ID)";
194
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
195
-        $table_name = 'esp_message_template';
196
-        $sql = "MTP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
194
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
195
+		$table_name = 'esp_message_template';
196
+		$sql = "MTP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
197 197
 					GRP_ID INT(10) UNSIGNED NOT NULL,
198 198
 					MTP_context VARCHAR(50) NOT NULL,
199 199
 					MTP_template_field VARCHAR(30) NOT NULL,
200 200
 					MTP_content TEXT NOT NULL,
201 201
 					PRIMARY KEY  (MTP_ID),
202 202
 					KEY GRP_ID (GRP_ID)";
203
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
204
-        $this->_get_table_manager()->dropIndex('esp_message_template_group', 'EVT_ID');
205
-        $table_name = 'esp_message_template_group';
206
-        $sql = "GRP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
203
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
204
+		$this->_get_table_manager()->dropIndex('esp_message_template_group', 'EVT_ID');
205
+		$table_name = 'esp_message_template_group';
206
+		$sql = "GRP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
207 207
 					MTP_user_id INT(10) NOT NULL DEFAULT '1',
208 208
 					MTP_name VARCHAR(245) NOT NULL DEFAULT '',
209 209
 					MTP_description VARCHAR(245) NOT NULL DEFAULT '',
@@ -215,17 +215,17 @@  discard block
 block discarded – undo
215 215
 					MTP_is_active TINYINT(1) NOT NULL DEFAULT '1',
216 216
 					PRIMARY KEY  (GRP_ID),
217 217
 					KEY MTP_user_id (MTP_user_id)";
218
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
219
-        $table_name = 'esp_event_message_template';
220
-        $sql = "EMT_ID BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
218
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
219
+		$table_name = 'esp_event_message_template';
220
+		$sql = "EMT_ID BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
221 221
 					EVT_ID BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
222 222
 					GRP_ID INT(10) UNSIGNED NOT NULL DEFAULT 0,
223 223
 					PRIMARY KEY  (EMT_ID),
224 224
 					KEY EVT_ID (EVT_ID),
225 225
 					KEY GRP_ID (GRP_ID)";
226
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
227
-        $table_name = 'esp_payment';
228
-        $sql = "PAY_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
226
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
227
+		$table_name = 'esp_payment';
228
+		$sql = "PAY_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
229 229
 					TXN_ID INT(10) UNSIGNED DEFAULT NULL,
230 230
 					STS_ID VARCHAR(3) COLLATE utf8_bin DEFAULT NULL,
231 231
 					PAY_timestamp DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
@@ -241,28 +241,28 @@  discard block
 block discarded – undo
241 241
 					PRIMARY KEY  (PAY_ID),
242 242
 					KEY TXN_ID (TXN_ID),
243 243
 					KEY PAY_timestamp (PAY_timestamp)";
244
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
245
-        $table_name = "esp_ticket_price";
246
-        $sql = "TKP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
244
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
245
+		$table_name = "esp_ticket_price";
246
+		$sql = "TKP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
247 247
 					  TKT_ID INT(10) UNSIGNED NOT NULL,
248 248
 					  PRC_ID INT(10) UNSIGNED NOT NULL,
249 249
 					  PRIMARY KEY  (TKP_ID)";
250
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
251
-        $table_name = "esp_datetime_ticket";
252
-        $sql = "DTK_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
250
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
251
+		$table_name = "esp_datetime_ticket";
252
+		$sql = "DTK_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
253 253
 					  DTT_ID INT(10) UNSIGNED NOT NULL,
254 254
 					  TKT_ID INT(10) UNSIGNED NOT NULL,
255 255
 					  PRIMARY KEY  (DTK_ID)";
256
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
257
-        $table_name = "esp_ticket_template";
258
-        $sql = "TTM_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
256
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
257
+		$table_name = "esp_ticket_template";
258
+		$sql = "TTM_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
259 259
 					  TTM_name VARCHAR(45) NOT NULL,
260 260
 					  TTM_description TEXT,
261 261
 					  TTM_file VARCHAR(45),
262 262
 					  PRIMARY KEY  (TTM_ID)";
263
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
264
-        $table_name = 'esp_question';
265
-        $sql = 'QST_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
263
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
264
+		$table_name = 'esp_question';
265
+		$sql = 'QST_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
266 266
 					QST_display_text TEXT NOT NULL,
267 267
 					QST_admin_label VARCHAR(255) NOT NULL,
268 268
 					QST_system VARCHAR(25) DEFAULT NULL,
@@ -274,25 +274,25 @@  discard block
 block discarded – undo
274 274
 					QST_wp_user BIGINT UNSIGNED NULL,
275 275
 					QST_deleted TINYINT UNSIGNED NOT NULL DEFAULT 0,
276 276
 					PRIMARY KEY  (QST_ID)';
277
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
278
-        $table_name = 'esp_question_group_question';
279
-        $sql = "QGQ_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
277
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
278
+		$table_name = 'esp_question_group_question';
279
+		$sql = "QGQ_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
280 280
 					QSG_ID INT UNSIGNED NOT NULL,
281 281
 					QST_ID INT UNSIGNED NOT NULL,
282 282
 					QGQ_order INT UNSIGNED NOT NULL DEFAULT 0,
283 283
 					PRIMARY KEY  (QGQ_ID) ";
284
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
285
-        $table_name = 'esp_question_option';
286
-        $sql = "QSO_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
284
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
285
+		$table_name = 'esp_question_option';
286
+		$sql = "QSO_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
287 287
 					QSO_value VARCHAR(255) NOT NULL,
288 288
 					QSO_desc TEXT NOT NULL,
289 289
 					QST_ID INT UNSIGNED NOT NULL,
290 290
 					QSO_order INT UNSIGNED NOT NULL DEFAULT 0,
291 291
 					QSO_deleted TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
292 292
 					PRIMARY KEY  (QSO_ID)";
293
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
294
-        $table_name = 'esp_registration';
295
-        $sql = "REG_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
293
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
294
+		$table_name = 'esp_registration';
295
+		$sql = "REG_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
296 296
 					  EVT_ID BIGINT(20) UNSIGNED NOT NULL,
297 297
 					  ATT_ID BIGINT(20) UNSIGNED NOT NULL,
298 298
 					  TXN_ID INT(10) UNSIGNED NOT NULL,
@@ -315,25 +315,25 @@  discard block
 block discarded – undo
315 315
 					  KEY STS_ID (STS_ID),
316 316
 					  KEY REG_url_link (REG_url_link),
317 317
 					  KEY REG_code (REG_code)";
318
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
319
-        $table_name = 'esp_checkin';
320
-        $sql = "CHK_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
318
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
319
+		$table_name = 'esp_checkin';
320
+		$sql = "CHK_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
321 321
 					REG_ID INT(10) UNSIGNED NOT NULL,
322 322
 					DTT_ID INT(10) UNSIGNED NOT NULL,
323 323
 					CHK_in TINYINT(1) UNSIGNED NOT NULL DEFAULT 1,
324 324
 					CHK_timestamp DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
325 325
 					PRIMARY KEY  (CHK_ID)";
326
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
327
-        $table_name = 'esp_state';
328
-        $sql = "STA_ID smallint(5) UNSIGNED NOT NULL AUTO_INCREMENT,
326
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
327
+		$table_name = 'esp_state';
328
+		$sql = "STA_ID smallint(5) UNSIGNED NOT NULL AUTO_INCREMENT,
329 329
 					  CNT_ISO VARCHAR(2) COLLATE utf8_bin NOT NULL,
330 330
 					  STA_abbrev VARCHAR(6) COLLATE utf8_bin NOT NULL,
331 331
 					  STA_name VARCHAR(100) COLLATE utf8_bin NOT NULL,
332 332
 					  STA_active TINYINT(1) DEFAULT '1',
333 333
 					  PRIMARY KEY  (STA_ID)";
334
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
335
-        $table_name = 'esp_status';
336
-        $sql = "STS_ID VARCHAR(3) COLLATE utf8_bin NOT NULL,
334
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
335
+		$table_name = 'esp_status';
336
+		$sql = "STS_ID VARCHAR(3) COLLATE utf8_bin NOT NULL,
337 337
 					  STS_code VARCHAR(45) COLLATE utf8_bin NOT NULL,
338 338
 					  STS_type set('event','registration','transaction','payment','email') COLLATE utf8_bin NOT NULL,
339 339
 					  STS_can_edit TINYINT(1) NOT NULL DEFAULT 0,
@@ -341,9 +341,9 @@  discard block
 block discarded – undo
341 341
 					  STS_open TINYINT(1) NOT NULL DEFAULT 1,
342 342
 					  UNIQUE KEY STS_ID_UNIQUE (STS_ID),
343 343
 					  KEY STS_type (STS_type)";
344
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
345
-        $table_name = 'esp_transaction';
346
-        $sql = "TXN_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
344
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
345
+		$table_name = 'esp_transaction';
346
+		$sql = "TXN_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
347 347
 					  TXN_timestamp DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
348 348
 					  TXN_total DECIMAL(10,3) DEFAULT '0.00',
349 349
 					  TXN_paid DECIMAL(10,3) NOT NULL DEFAULT '0.00',
@@ -354,9 +354,9 @@  discard block
 block discarded – undo
354 354
 					  PRIMARY KEY  (TXN_ID),
355 355
 					  KEY TXN_timestamp (TXN_timestamp),
356 356
 					  KEY STS_ID (STS_ID)";
357
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
358
-        $table_name = 'esp_venue_meta';
359
-        $sql = "VNUM_ID INT(11) NOT NULL AUTO_INCREMENT,
357
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
358
+		$table_name = 'esp_venue_meta';
359
+		$sql = "VNUM_ID INT(11) NOT NULL AUTO_INCREMENT,
360 360
 			VNU_ID BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
361 361
 			VNU_address VARCHAR(255) DEFAULT NULL,
362 362
 			VNU_address2 VARCHAR(255) DEFAULT NULL,
@@ -374,10 +374,10 @@  discard block
 block discarded – undo
374 374
 			PRIMARY KEY  (VNUM_ID),
375 375
 			KEY STA_ID (STA_ID),
376 376
 			KEY CNT_ISO (CNT_ISO)";
377
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
378
-        //modified tables
379
-        $table_name = "esp_price";
380
-        $sql = "PRC_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
377
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
378
+		//modified tables
379
+		$table_name = "esp_price";
380
+		$sql = "PRC_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
381 381
 					  PRT_ID TINYINT(3) UNSIGNED NOT NULL,
382 382
 					  PRC_amount DECIMAL(10,3) NOT NULL DEFAULT '0.00',
383 383
 					  PRC_name VARCHAR(245) NOT NULL,
@@ -389,9 +389,9 @@  discard block
 block discarded – undo
389 389
 					  PRC_wp_user BIGINT UNSIGNED NULL,
390 390
 					  PRC_parent INT(10) UNSIGNED DEFAULT 0,
391 391
 					  PRIMARY KEY  (PRC_ID)";
392
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
393
-        $table_name = "esp_price_type";
394
-        $sql = "PRT_ID TINYINT(3) UNSIGNED NOT NULL AUTO_INCREMENT,
392
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
393
+		$table_name = "esp_price_type";
394
+		$sql = "PRT_ID TINYINT(3) UNSIGNED NOT NULL AUTO_INCREMENT,
395 395
 				  PRT_name VARCHAR(45) NOT NULL,
396 396
 				  PBT_ID TINYINT(3) UNSIGNED NOT NULL DEFAULT '1',
397 397
 				  PRT_is_percent TINYINT(1) NOT NULL DEFAULT '0',
@@ -400,9 +400,9 @@  discard block
 block discarded – undo
400 400
 				  PRT_deleted TINYINT(1) NOT NULL DEFAULT '0',
401 401
 				  UNIQUE KEY PRT_name_UNIQUE (PRT_name),
402 402
 				  PRIMARY KEY  (PRT_ID)";
403
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
404
-        $table_name = "esp_ticket";
405
-        $sql = "TKT_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
403
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB ');
404
+		$table_name = "esp_ticket";
405
+		$sql = "TKT_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
406 406
 					  TTM_ID INT(10) UNSIGNED NOT NULL,
407 407
 					  TKT_name VARCHAR(245) NOT NULL DEFAULT '',
408 408
 					  TKT_description TEXT NOT NULL,
@@ -423,10 +423,10 @@  discard block
 block discarded – undo
423 423
 					  TKT_parent INT(10) UNSIGNED DEFAULT '0',
424 424
 					  TKT_deleted TINYINT(1) NOT NULL DEFAULT '0',
425 425
 					  PRIMARY KEY  (TKT_ID)";
426
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
427
-        $this->_get_table_manager()->dropIndex('esp_question_group', 'QSG_identifier_UNIQUE');
428
-        $table_name = 'esp_question_group';
429
-        $sql = 'QSG_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
426
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
427
+		$this->_get_table_manager()->dropIndex('esp_question_group', 'QSG_identifier_UNIQUE');
428
+		$table_name = 'esp_question_group';
429
+		$sql = 'QSG_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
430 430
 					QSG_name VARCHAR(255) NOT NULL,
431 431
 					QSG_identifier VARCHAR(100) NOT NULL,
432 432
 					QSG_desc TEXT NULL,
@@ -438,135 +438,135 @@  discard block
 block discarded – undo
438 438
 					QSG_wp_user BIGINT UNSIGNED NULL,
439 439
 					PRIMARY KEY  (QSG_ID),
440 440
 					UNIQUE KEY QSG_identifier_UNIQUE (QSG_identifier ASC)';
441
-        $this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
442
-        $script_4_1_defaults = EE_Registry::instance()->load_dms('Core_4_1_0');
443
-        //(because many need to convert old string states to foreign keys into the states table)
444
-        $script_4_1_defaults->insert_default_states();
445
-        $script_4_1_defaults->insert_default_countries();
446
-        //schema on price, price_types and tickets has changed so use the DEFAULT method in here instead of 4.1's and later.
447
-        $this->insert_default_price_types();
448
-        $this->insert_default_prices();
449
-        $this->insert_default_tickets();
450
-        //setting up the config wp option pretty well counts as a 'schema change', or at least should happen ehre
451
-        EE_Config::instance()->update_espresso_config(false, true);
452
-        return true;
453
-    }
454
-
455
-
456
-
457
-    /**
458
-     * @return boolean
459
-     */
460
-    public function schema_changes_after_migration()
461
-    {
462
-        return true;
463
-    }
464
-
465
-
466
-
467
-    public function migration_page_hooks()
468
-    {
469
-    }
470
-
471
-
472
-
473
-    /**
474
-     * insert_default_price_types
475
-     *
476
-     * @since 4.5.0
477
-     * @return void
478
-     */
479
-    public function insert_default_price_types()
480
-    {
481
-        global $wpdb;
482
-        $price_type_table = $wpdb->prefix . "esp_price_type";
483
-        if ($this->_get_table_analysis()->tableExists($price_type_table)) {
484
-            $SQL = 'SELECT COUNT(PRT_ID) FROM ' . $price_type_table;
485
-            $price_types_exist = $wpdb->get_var($SQL);
486
-            if ( ! $price_types_exist) {
487
-                $user_id = EEH_Activation::get_default_creator_id();
488
-                $SQL = "INSERT INTO $price_type_table ( PRT_ID, PRT_name, PBT_ID, PRT_is_percent, PRT_order, PRT_wp_user, PRT_deleted ) VALUES
441
+		$this->_table_should_exist_previously($table_name, $sql, 'ENGINE=InnoDB');
442
+		$script_4_1_defaults = EE_Registry::instance()->load_dms('Core_4_1_0');
443
+		//(because many need to convert old string states to foreign keys into the states table)
444
+		$script_4_1_defaults->insert_default_states();
445
+		$script_4_1_defaults->insert_default_countries();
446
+		//schema on price, price_types and tickets has changed so use the DEFAULT method in here instead of 4.1's and later.
447
+		$this->insert_default_price_types();
448
+		$this->insert_default_prices();
449
+		$this->insert_default_tickets();
450
+		//setting up the config wp option pretty well counts as a 'schema change', or at least should happen ehre
451
+		EE_Config::instance()->update_espresso_config(false, true);
452
+		return true;
453
+	}
454
+
455
+
456
+
457
+	/**
458
+	 * @return boolean
459
+	 */
460
+	public function schema_changes_after_migration()
461
+	{
462
+		return true;
463
+	}
464
+
465
+
466
+
467
+	public function migration_page_hooks()
468
+	{
469
+	}
470
+
471
+
472
+
473
+	/**
474
+	 * insert_default_price_types
475
+	 *
476
+	 * @since 4.5.0
477
+	 * @return void
478
+	 */
479
+	public function insert_default_price_types()
480
+	{
481
+		global $wpdb;
482
+		$price_type_table = $wpdb->prefix . "esp_price_type";
483
+		if ($this->_get_table_analysis()->tableExists($price_type_table)) {
484
+			$SQL = 'SELECT COUNT(PRT_ID) FROM ' . $price_type_table;
485
+			$price_types_exist = $wpdb->get_var($SQL);
486
+			if ( ! $price_types_exist) {
487
+				$user_id = EEH_Activation::get_default_creator_id();
488
+				$SQL = "INSERT INTO $price_type_table ( PRT_ID, PRT_name, PBT_ID, PRT_is_percent, PRT_order, PRT_wp_user, PRT_deleted ) VALUES
489 489
 							(1, '" . __('Base Price', 'event_espresso') . "', 1,  0, 0, $user_id, 0),
490 490
 							(2, '" . __('Percent Discount', 'event_espresso') . "', 2,  1, 20, $user_id, 0),
491 491
 							(3, '" . __('Dollar Discount', 'event_espresso') . "', 2,  0, 30, $user_id, 0),
492 492
 							(4, '" . __('Percent Surcharge', 'event_espresso') . "', 3,  1, 40, $user_id,  0),
493 493
 							(5, '" . __('Dollar Surcharge', 'event_espresso') . "', 3,  0, 50, $user_id, 0);";
494
-                $SQL = apply_filters('FHEE__EE_DMS_4_5_0__insert_default_price_types__SQL', $SQL);
495
-                $wpdb->query($SQL);
496
-            }
497
-        }
498
-    }
499
-
500
-
501
-
502
-    /**
503
-     * insert DEFAULT prices.
504
-     *  If we're INSTALLING 4.x CAF, then we add a few extra DEFAULT prices
505
-     * when EEH_Activaion's initialize_db_content is called via  ahook in
506
-     * EE_Brewing_regular
507
-     *
508
-     * @since 4.5.0
509
-     * @return void
510
-     */
511
-    public function insert_default_prices()
512
-    {
513
-        global $wpdb;
514
-        $price_table = $wpdb->prefix . "esp_price";
515
-        if ($this->_get_table_analysis()->tableExists($price_table)) {
516
-            $SQL = 'SELECT COUNT(PRC_ID) FROM ' . $price_table;
517
-            $prices_exist = $wpdb->get_var($SQL);
518
-            if ( ! $prices_exist) {
519
-                $user_id = EEH_Activation::get_default_creator_id();
520
-                $SQL = "INSERT INTO $price_table
494
+				$SQL = apply_filters('FHEE__EE_DMS_4_5_0__insert_default_price_types__SQL', $SQL);
495
+				$wpdb->query($SQL);
496
+			}
497
+		}
498
+	}
499
+
500
+
501
+
502
+	/**
503
+	 * insert DEFAULT prices.
504
+	 *  If we're INSTALLING 4.x CAF, then we add a few extra DEFAULT prices
505
+	 * when EEH_Activaion's initialize_db_content is called via  ahook in
506
+	 * EE_Brewing_regular
507
+	 *
508
+	 * @since 4.5.0
509
+	 * @return void
510
+	 */
511
+	public function insert_default_prices()
512
+	{
513
+		global $wpdb;
514
+		$price_table = $wpdb->prefix . "esp_price";
515
+		if ($this->_get_table_analysis()->tableExists($price_table)) {
516
+			$SQL = 'SELECT COUNT(PRC_ID) FROM ' . $price_table;
517
+			$prices_exist = $wpdb->get_var($SQL);
518
+			if ( ! $prices_exist) {
519
+				$user_id = EEH_Activation::get_default_creator_id();
520
+				$SQL = "INSERT INTO $price_table
521 521
 							(PRC_ID, PRT_ID, PRC_amount, PRC_name, PRC_desc,  PRC_is_default, PRC_overrides, PRC_wp_user, PRC_order, PRC_deleted, PRC_parent ) VALUES
522 522
 							(1, 1, '0.00', 'Free Admission', '', 1, NULL, $user_id, 0, 0, 0);";
523
-                $SQL = apply_filters('FHEE__EE_DMS_4_5_0__insert_default_prices__SQL', $SQL);
524
-                $wpdb->query($SQL);
525
-            }
526
-        }
527
-    }
528
-
529
-
530
-
531
-    /**
532
-     * insert DEFAULT ticket
533
-     * Almost identical to EE_DMS_Core_4_3_0::insert_default_tickets, except is aware of the TKT_wp_user field
534
-     *
535
-     * @since 4.5.0
536
-     * @return void
537
-     */
538
-    public function insert_default_tickets()
539
-    {
540
-        global $wpdb;
541
-        $ticket_table = $wpdb->prefix . "esp_ticket";
542
-        if ($this->_get_table_analysis()->tableExists($ticket_table)) {
543
-            $SQL = 'SELECT COUNT(TKT_ID) FROM ' . $ticket_table;
544
-            $tickets_exist = $wpdb->get_var($SQL);
545
-            if ( ! $tickets_exist) {
546
-                $user_id = EEH_Activation::get_default_creator_id();
547
-                $SQL = "INSERT INTO $ticket_table
523
+				$SQL = apply_filters('FHEE__EE_DMS_4_5_0__insert_default_prices__SQL', $SQL);
524
+				$wpdb->query($SQL);
525
+			}
526
+		}
527
+	}
528
+
529
+
530
+
531
+	/**
532
+	 * insert DEFAULT ticket
533
+	 * Almost identical to EE_DMS_Core_4_3_0::insert_default_tickets, except is aware of the TKT_wp_user field
534
+	 *
535
+	 * @since 4.5.0
536
+	 * @return void
537
+	 */
538
+	public function insert_default_tickets()
539
+	{
540
+		global $wpdb;
541
+		$ticket_table = $wpdb->prefix . "esp_ticket";
542
+		if ($this->_get_table_analysis()->tableExists($ticket_table)) {
543
+			$SQL = 'SELECT COUNT(TKT_ID) FROM ' . $ticket_table;
544
+			$tickets_exist = $wpdb->get_var($SQL);
545
+			if ( ! $tickets_exist) {
546
+				$user_id = EEH_Activation::get_default_creator_id();
547
+				$SQL = "INSERT INTO $ticket_table
548 548
 					( TKT_ID, TTM_ID, TKT_name, TKT_description, TKT_qty, TKT_sold, TKT_uses, TKT_required, TKT_min, TKT_max, TKT_price, TKT_start_date, TKT_end_date, TKT_taxable, TKT_order, TKT_row, TKT_is_default, TKT_parent, TKT_wp_user, TKT_deleted ) VALUES
549 549
 					( 1, 0, '"
550
-                       . __("Free Ticket", "event_espresso")
551
-                       . "', '', 100, 0, -1, 0, 0, -1, 0.00, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, 0, 1, 1, 0, $user_id, 0);";
552
-                $SQL = apply_filters('FHEE__EE_DMS_4_5_0__insert_default_tickets__SQL', $SQL);
553
-                $wpdb->query($SQL);
554
-            }
555
-        }
556
-        $ticket_price_table = $wpdb->prefix . "esp_ticket_price";
557
-        if ($this->_get_table_analysis()->tableExists($ticket_price_table)) {
558
-            $SQL = 'SELECT COUNT(TKP_ID) FROM ' . $ticket_price_table;
559
-            $ticket_prc_exist = $wpdb->get_var($SQL);
560
-            if ( ! $ticket_prc_exist) {
561
-                $SQL = "INSERT INTO $ticket_price_table
550
+					   . __("Free Ticket", "event_espresso")
551
+					   . "', '', 100, 0, -1, 0, 0, -1, 0.00, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, 0, 1, 1, 0, $user_id, 0);";
552
+				$SQL = apply_filters('FHEE__EE_DMS_4_5_0__insert_default_tickets__SQL', $SQL);
553
+				$wpdb->query($SQL);
554
+			}
555
+		}
556
+		$ticket_price_table = $wpdb->prefix . "esp_ticket_price";
557
+		if ($this->_get_table_analysis()->tableExists($ticket_price_table)) {
558
+			$SQL = 'SELECT COUNT(TKP_ID) FROM ' . $ticket_price_table;
559
+			$ticket_prc_exist = $wpdb->get_var($SQL);
560
+			if ( ! $ticket_prc_exist) {
561
+				$SQL = "INSERT INTO $ticket_price_table
562 562
 				( TKP_ID, TKT_ID, PRC_ID ) VALUES
563 563
 				( 1, 1, 1 )
564 564
 				";
565
-                $SQL = apply_filters('FHEE__EE_DMS_4_5_0__insert_default_tickets__SQL__ticket_price', $SQL);
566
-                $wpdb->query($SQL);
567
-            }
568
-        }
569
-    }
565
+				$SQL = apply_filters('FHEE__EE_DMS_4_5_0__insert_default_tickets__SQL__ticket_price', $SQL);
566
+				$wpdb->query($SQL);
567
+			}
568
+		}
569
+	}
570 570
 
571 571
 }
572 572
 
Please login to merge, or discard this patch.
core/data_migration_scripts/EE_DMS_Core_4_7_0.dms.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 // unfortunately, this needs to be done upon INCLUSION of this file,
16 16
 // instead of construction, because it only gets constructed on first page load
17 17
 // (all other times it gets resurrected from a wordpress option)
18
-$stages = glob(EE_CORE . 'data_migration_scripts/4_7_0_stages/*');
18
+$stages = glob(EE_CORE.'data_migration_scripts/4_7_0_stages/*');
19 19
 $class_to_filepath = array();
20 20
 foreach ($stages as $filepath) {
21 21
     $matches = array();
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
             return true;
80 80
         } elseif ( ! $version_string) {
81 81
             //no version string provided... this must be pre 4.3
82
-            return false;//changed mind. dont want people thinking they should migrate yet because they cant
82
+            return false; //changed mind. dont want people thinking they should migrate yet because they cant
83 83
         } else {
84 84
             return false;
85 85
         }
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
     public function schema_changes_before_migration()
104 104
     {
105 105
         //relies on 4.1's EEH_Activation::create_table
106
-        require_once(EE_HELPERS . 'EEH_Activation.helper.php');
106
+        require_once(EE_HELPERS.'EEH_Activation.helper.php');
107 107
         $table_name = 'esp_answer';
108 108
         $sql = " ANS_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
109 109
 					REG_ID INT UNSIGNED NOT NULL,
Please login to merge, or discard this patch.
Indentation   +181 added lines, -182 removed lines patch added patch discarded remove patch
@@ -9,7 +9,6 @@  discard block
 block discarded – undo
9 9
  * and recalculates esp_registration.REG_final_price to actually be the final price
10 10
  * for that registration (before this it was just the ticket's price, NOT including
11 11
  * taxes or other price modifiers)
12
-
13 12
  */
14 13
 // make sure we have all the stages loaded too
15 14
 // unfortunately, this needs to be done upon INCLUSION of this file,
@@ -18,9 +17,9 @@  discard block
 block discarded – undo
18 17
 $stages = glob(EE_CORE . 'data_migration_scripts/4_7_0_stages/*');
19 18
 $class_to_filepath = array();
20 19
 foreach ($stages as $filepath) {
21
-    $matches = array();
22
-    preg_match('~4_7_0_stages/(.*).dmsstage.php~', $filepath, $matches);
23
-    $class_to_filepath[$matches[1]] = $filepath;
20
+	$matches = array();
21
+	preg_match('~4_7_0_stages/(.*).dmsstage.php~', $filepath, $matches);
22
+	$class_to_filepath[$matches[1]] = $filepath;
24 23
 }
25 24
 //give addons a chance to autoload their stages too
26 25
 $class_to_filepath = apply_filters('FHEE__EE_DMS_4_7_0__autoloaded_stages', $class_to_filepath);
@@ -39,72 +38,72 @@  discard block
 block discarded – undo
39 38
 class EE_DMS_Core_4_7_0 extends EE_Data_Migration_Script_Base
40 39
 {
41 40
 
42
-    /**
43
-     * return EE_DMS_Core_4_7_0
44
-     *
45
-     * @param TableManager  $table_manager
46
-     * @param TableAnalysis $table_analysis
47
-     */
48
-    public function __construct(TableManager $table_manager = null, TableAnalysis $table_analysis = null)
49
-    {
50
-        $this->_pretty_name = __("Data Update to Event Espresso 4.7.0", "event_espresso");
51
-        $this->_priority = 10;
52
-        $this->_migration_stages = array(
53
-            new EE_DMS_4_7_0_Add_Taxes_To_REG_Final_Price(),
54
-            new EE_DMS_4_7_0_Registration_Payments(),
55
-        );
56
-        parent::__construct($table_manager, $table_analysis);
57
-    }
41
+	/**
42
+	 * return EE_DMS_Core_4_7_0
43
+	 *
44
+	 * @param TableManager  $table_manager
45
+	 * @param TableAnalysis $table_analysis
46
+	 */
47
+	public function __construct(TableManager $table_manager = null, TableAnalysis $table_analysis = null)
48
+	{
49
+		$this->_pretty_name = __("Data Update to Event Espresso 4.7.0", "event_espresso");
50
+		$this->_priority = 10;
51
+		$this->_migration_stages = array(
52
+			new EE_DMS_4_7_0_Add_Taxes_To_REG_Final_Price(),
53
+			new EE_DMS_4_7_0_Registration_Payments(),
54
+		);
55
+		parent::__construct($table_manager, $table_analysis);
56
+	}
58 57
 
59 58
 
60 59
 
61
-    /**
62
-     * @param array $version_array
63
-     * @return bool
64
-     */
65
-    public function can_migrate_from_version($version_array)
66
-    {
67
-        $version_string = $version_array['Core'];
68
-        if (
69
-            (
70
-                version_compare($version_string, '4.7.0', '<=')
71
-                && version_compare($version_string, '4.6.0', '>=')
72
-            )
73
-            || (
74
-                version_compare($version_string, '4.7.0', '>=')
75
-                && ! $this->_get_table_analysis()->tableExists('esp_registration_payment')
76
-                && $this->_get_table_analysis()->tableExists('esp_registration')
77
-            )
78
-        ) {
79
-            return true;
80
-        } elseif ( ! $version_string) {
81
-            //no version string provided... this must be pre 4.3
82
-            return false;//changed mind. dont want people thinking they should migrate yet because they cant
83
-        } else {
84
-            return false;
85
-        }
86
-    }
60
+	/**
61
+	 * @param array $version_array
62
+	 * @return bool
63
+	 */
64
+	public function can_migrate_from_version($version_array)
65
+	{
66
+		$version_string = $version_array['Core'];
67
+		if (
68
+			(
69
+				version_compare($version_string, '4.7.0', '<=')
70
+				&& version_compare($version_string, '4.6.0', '>=')
71
+			)
72
+			|| (
73
+				version_compare($version_string, '4.7.0', '>=')
74
+				&& ! $this->_get_table_analysis()->tableExists('esp_registration_payment')
75
+				&& $this->_get_table_analysis()->tableExists('esp_registration')
76
+			)
77
+		) {
78
+			return true;
79
+		} elseif ( ! $version_string) {
80
+			//no version string provided... this must be pre 4.3
81
+			return false;//changed mind. dont want people thinking they should migrate yet because they cant
82
+		} else {
83
+			return false;
84
+		}
85
+	}
87 86
 
88 87
 
89 88
 
90
-    /**
91
-     * @return bool
92
-     */
93
-    public function schema_changes_before_migration()
94
-    {
95
-        //relies on 4.1's EEH_Activation::create_table
96
-        require_once(EE_HELPERS . 'EEH_Activation.helper.php');
97
-        $table_name = 'esp_answer';
98
-        $sql = " ANS_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
89
+	/**
90
+	 * @return bool
91
+	 */
92
+	public function schema_changes_before_migration()
93
+	{
94
+		//relies on 4.1's EEH_Activation::create_table
95
+		require_once(EE_HELPERS . 'EEH_Activation.helper.php');
96
+		$table_name = 'esp_answer';
97
+		$sql = " ANS_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
99 98
 					REG_ID INT UNSIGNED NOT NULL,
100 99
 					QST_ID INT UNSIGNED NOT NULL,
101 100
 					ANS_value TEXT NOT NULL,
102 101
 					PRIMARY KEY  (ANS_ID),
103 102
 					KEY REG_ID (REG_ID),
104 103
 					KEY QST_ID (QST_ID)";
105
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
106
-        $table_name = 'esp_attendee_meta';
107
-        $sql = "ATTM_ID INT(10) UNSIGNED NOT	NULL AUTO_INCREMENT,
104
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
105
+		$table_name = 'esp_attendee_meta';
106
+		$sql = "ATTM_ID INT(10) UNSIGNED NOT	NULL AUTO_INCREMENT,
108 107
 						ATT_ID BIGINT(20) UNSIGNED NOT NULL,
109 108
 						ATT_fname VARCHAR(45) NOT NULL,
110 109
 						ATT_lname VARCHAR(45) NOT	NULL,
@@ -121,9 +120,9 @@  discard block
 block discarded – undo
121 120
 								KEY ATT_email (ATT_email),
122 121
 								KEY ATT_lname (ATT_lname),
123 122
 								KEY ATT_fname (ATT_fname)";
124
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
125
-        $table_name = 'esp_country';
126
-        $sql = "CNT_ISO VARCHAR(2) COLLATE utf8_bin NOT NULL,
123
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
124
+		$table_name = 'esp_country';
125
+		$sql = "CNT_ISO VARCHAR(2) COLLATE utf8_bin NOT NULL,
127 126
 					  CNT_ISO3 VARCHAR(3) COLLATE utf8_bin NOT NULL,
128 127
 					  RGN_ID TINYINT(3) UNSIGNED DEFAULT NULL,
129 128
 					  CNT_name VARCHAR(45) COLLATE utf8_bin NOT NULL,
@@ -139,25 +138,25 @@  discard block
 block discarded – undo
139 138
 					  CNT_is_EU TINYINT(1) DEFAULT '0',
140 139
 					  CNT_active TINYINT(1) DEFAULT '0',
141 140
 					  PRIMARY KEY  (CNT_ISO)";
142
-        $this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
143
-        $table_name = 'esp_currency';
144
-        $sql = "CUR_code VARCHAR(6) COLLATE utf8_bin NOT NULL,
141
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
142
+		$table_name = 'esp_currency';
143
+		$sql = "CUR_code VARCHAR(6) COLLATE utf8_bin NOT NULL,
145 144
 				CUR_single VARCHAR(45) COLLATE utf8_bin DEFAULT 'dollar',
146 145
 				CUR_plural VARCHAR(45) COLLATE utf8_bin DEFAULT 'dollars',
147 146
 				CUR_sign VARCHAR(45) COLLATE utf8_bin DEFAULT '$',
148 147
 				CUR_dec_plc VARCHAR(1) COLLATE utf8_bin NOT NULL DEFAULT '2',
149 148
 				CUR_active TINYINT(1) DEFAULT '0',
150 149
 				PRIMARY KEY  (CUR_code)";
151
-        $this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
152
-        $table_name = 'esp_currency_payment_method';
153
-        $sql = "CPM_ID INT(11) NOT NULL AUTO_INCREMENT,
150
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
151
+		$table_name = 'esp_currency_payment_method';
152
+		$sql = "CPM_ID INT(11) NOT NULL AUTO_INCREMENT,
154 153
 				CUR_code  VARCHAR(6) COLLATE utf8_bin NOT NULL,
155 154
 				PMD_ID INT(11) NOT NULL,
156 155
 				PRIMARY KEY  (CPM_ID),
157 156
 				KEY PMD_ID (PMD_ID)";
158
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
159
-        $table_name = 'esp_datetime';
160
-        $sql = "DTT_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
157
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
158
+		$table_name = 'esp_datetime';
159
+		$sql = "DTT_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
161 160
 				  EVT_ID BIGINT(20) UNSIGNED NOT NULL,
162 161
 				  DTT_name VARCHAR(255) NOT NULL DEFAULT '',
163 162
 				  DTT_description TEXT NOT NULL,
@@ -173,9 +172,9 @@  discard block
 block discarded – undo
173 172
 						KEY DTT_EVT_start (DTT_EVT_start),
174 173
 						KEY EVT_ID (EVT_ID),
175 174
 						KEY DTT_is_primary (DTT_is_primary)";
176
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
177
-        $table_name = 'esp_event_meta';
178
-        $sql = "
175
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
176
+		$table_name = 'esp_event_meta';
177
+		$sql = "
179 178
 			EVTM_ID INT NOT NULL AUTO_INCREMENT,
180 179
 			EVT_ID BIGINT(20) UNSIGNED NOT NULL,
181 180
 			EVT_display_desc TINYINT(1) UNSIGNED NOT NULL DEFAULT 1,
@@ -191,34 +190,34 @@  discard block
 block discarded – undo
191 190
 			EVT_donations TINYINT(1) NULL,
192 191
 			PRIMARY KEY  (EVTM_ID),
193 192
 			KEY EVT_ID (EVT_ID)";
194
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
195
-        $table_name = 'esp_event_question_group';
196
-        $sql = "EQG_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
193
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
194
+		$table_name = 'esp_event_question_group';
195
+		$sql = "EQG_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
197 196
 					EVT_ID BIGINT(20) UNSIGNED NOT NULL,
198 197
 					QSG_ID INT UNSIGNED NOT NULL,
199 198
 					EQG_primary TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
200 199
 					PRIMARY KEY  (EQG_ID),
201 200
 					KEY EVT_ID (EVT_ID),
202 201
 					KEY QSG_ID (QSG_ID)";
203
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
204
-        $table_name = 'esp_event_venue';
205
-        $sql = "EVV_ID INT(11) NOT NULL AUTO_INCREMENT,
202
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
203
+		$table_name = 'esp_event_venue';
204
+		$sql = "EVV_ID INT(11) NOT NULL AUTO_INCREMENT,
206 205
 				EVT_ID BIGINT(20) UNSIGNED NOT NULL,
207 206
 				VNU_ID BIGINT(20) UNSIGNED NOT NULL,
208 207
 				EVV_primary TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
209 208
 				PRIMARY KEY  (EVV_ID)";
210
-        $this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
211
-        $table_name = 'esp_extra_meta';
212
-        $sql = "EXM_ID INT(11) NOT NULL AUTO_INCREMENT,
209
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
210
+		$table_name = 'esp_extra_meta';
211
+		$sql = "EXM_ID INT(11) NOT NULL AUTO_INCREMENT,
213 212
 				OBJ_ID INT(11) DEFAULT NULL,
214 213
 				EXM_type VARCHAR(45) DEFAULT NULL,
215 214
 				EXM_key VARCHAR(45) DEFAULT NULL,
216 215
 				EXM_value TEXT,
217 216
 				PRIMARY KEY  (EXM_ID),
218 217
 				KEY EXM_type (EXM_type, OBJ_ID, EXM_key(45))";
219
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
220
-        $table_name = 'esp_line_item';
221
-        $sql = "LIN_ID INT(11) NOT NULL AUTO_INCREMENT,
218
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
219
+		$table_name = 'esp_line_item';
220
+		$sql = "LIN_ID INT(11) NOT NULL AUTO_INCREMENT,
222 221
 				LIN_code VARCHAR(245) NOT NULL DEFAULT '',
223 222
 				TXN_ID INT(11) DEFAULT NULL,
224 223
 				LIN_name VARCHAR(245) NOT NULL DEFAULT '',
@@ -236,9 +235,9 @@  discard block
 block discarded – undo
236 235
 				PRIMARY KEY  (LIN_ID),
237 236
 				KEY LIN_code (LIN_code(191)),
238 237
 				KEY TXN_ID (TXN_ID)";
239
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
240
-        $table_name = 'esp_log';
241
-        $sql = "LOG_ID INT(11) NOT NULL AUTO_INCREMENT,
238
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
239
+		$table_name = 'esp_log';
240
+		$sql = "LOG_ID INT(11) NOT NULL AUTO_INCREMENT,
242 241
 				LOG_time DATETIME DEFAULT NULL,
243 242
 				OBJ_ID VARCHAR(45) DEFAULT NULL,
244 243
 				OBJ_type VARCHAR(45) DEFAULT NULL,
@@ -249,18 +248,18 @@  discard block
 block discarded – undo
249 248
 				KEY LOG_time (LOG_time),
250 249
 				KEY OBJ (OBJ_type,OBJ_ID),
251 250
 				KEY LOG_type (LOG_type)";
252
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
253
-        $table_name = 'esp_message_template';
254
-        $sql = "MTP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
251
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
252
+		$table_name = 'esp_message_template';
253
+		$sql = "MTP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
255 254
 					GRP_ID INT(10) UNSIGNED NOT NULL,
256 255
 					MTP_context VARCHAR(50) NOT NULL,
257 256
 					MTP_template_field VARCHAR(30) NOT NULL,
258 257
 					MTP_content TEXT NOT NULL,
259 258
 					PRIMARY KEY  (MTP_ID),
260 259
 					KEY GRP_ID (GRP_ID)";
261
-        $this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
262
-        $table_name = 'esp_message_template_group';
263
-        $sql = "GRP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
260
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
261
+		$table_name = 'esp_message_template_group';
262
+		$sql = "GRP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
264 263
 					MTP_user_id INT(10) NOT NULL DEFAULT '1',
265 264
 					MTP_name VARCHAR(245) NOT NULL DEFAULT '',
266 265
 					MTP_description VARCHAR(245) NOT NULL DEFAULT '',
@@ -272,17 +271,17 @@  discard block
 block discarded – undo
272 271
 					MTP_is_active TINYINT(1) NOT NULL DEFAULT '1',
273 272
 					PRIMARY KEY  (GRP_ID),
274 273
 					KEY MTP_user_id (MTP_user_id)";
275
-        $this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
276
-        $table_name = 'esp_event_message_template';
277
-        $sql = "EMT_ID BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
274
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
275
+		$table_name = 'esp_event_message_template';
276
+		$sql = "EMT_ID BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
278 277
 					EVT_ID BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
279 278
 					GRP_ID INT(10) UNSIGNED NOT NULL DEFAULT 0,
280 279
 					PRIMARY KEY  (EMT_ID),
281 280
 					KEY EVT_ID (EVT_ID),
282 281
 					KEY GRP_ID (GRP_ID)";
283
-        $this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
284
-        $table_name = 'esp_payment';
285
-        $sql = "PAY_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
282
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
283
+		$table_name = 'esp_payment';
284
+		$sql = "PAY_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
286 285
 					TXN_ID INT(10) UNSIGNED DEFAULT NULL,
287 286
 					STS_ID VARCHAR(3) COLLATE utf8_bin DEFAULT NULL,
288 287
 					PAY_timestamp DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
@@ -299,9 +298,9 @@  discard block
 block discarded – undo
299 298
 					PRIMARY KEY  (PAY_ID),
300 299
 					KEY PAY_timestamp (PAY_timestamp),
301 300
 					KEY TXN_ID (TXN_ID)";
302
-        $this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB ');
303
-        $table_name = 'esp_payment_method';
304
-        $sql = "PMD_ID INT(11) NOT NULL AUTO_INCREMENT,
301
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB ');
302
+		$table_name = 'esp_payment_method';
303
+		$sql = "PMD_ID INT(11) NOT NULL AUTO_INCREMENT,
305 304
 				PMD_type VARCHAR(124) DEFAULT NULL,
306 305
 				PMD_name VARCHAR(255) DEFAULT NULL,
307 306
 				PMD_desc TEXT,
@@ -317,32 +316,32 @@  discard block
 block discarded – undo
317 316
 				PRIMARY KEY  (PMD_ID),
318 317
 				UNIQUE KEY PMD_slug_UNIQUE (PMD_slug),
319 318
 				KEY PMD_type (PMD_type)";
320
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
321
-        $table_name = "esp_ticket_price";
322
-        $sql = "TKP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
319
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
320
+		$table_name = "esp_ticket_price";
321
+		$sql = "TKP_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
323 322
 					  TKT_ID INT(10) UNSIGNED NOT NULL,
324 323
 					  PRC_ID INT(10) UNSIGNED NOT NULL,
325 324
 					  PRIMARY KEY  (TKP_ID),
326 325
 					  KEY TKT_ID (TKT_ID),
327 326
 					  KEY PRC_ID (PRC_ID)";
328
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
329
-        $table_name = "esp_datetime_ticket";
330
-        $sql = "DTK_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
327
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
328
+		$table_name = "esp_datetime_ticket";
329
+		$sql = "DTK_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
331 330
 					  DTT_ID INT(10) UNSIGNED NOT NULL,
332 331
 					  TKT_ID INT(10) UNSIGNED NOT NULL,
333 332
 					  PRIMARY KEY  (DTK_ID),
334 333
 					  KEY DTT_ID (DTT_ID),
335 334
 					  KEY TKT_ID (TKT_ID)";
336
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
337
-        $table_name = "esp_ticket_template";
338
-        $sql = "TTM_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
335
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
336
+		$table_name = "esp_ticket_template";
337
+		$sql = "TTM_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
339 338
 					  TTM_name VARCHAR(45) NOT NULL,
340 339
 					  TTM_description TEXT,
341 340
 					  TTM_file VARCHAR(45),
342 341
 					  PRIMARY KEY  (TTM_ID)";
343
-        $this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
344
-        $table_name = 'esp_question';
345
-        $sql = 'QST_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
342
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
343
+		$table_name = 'esp_question';
344
+		$sql = 'QST_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
346 345
 					QST_display_text TEXT NOT NULL,
347 346
 					QST_admin_label VARCHAR(255) NOT NULL,
348 347
 					QST_system VARCHAR(25) DEFAULT NULL,
@@ -355,18 +354,18 @@  discard block
 block discarded – undo
355 354
 					QST_deleted TINYINT UNSIGNED NOT NULL DEFAULT 0,
356 355
 					PRIMARY KEY  (QST_ID),
357 356
 					KEY QST_order (QST_order)';
358
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
359
-        $table_name = 'esp_question_group_question';
360
-        $sql = "QGQ_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
357
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
358
+		$table_name = 'esp_question_group_question';
359
+		$sql = "QGQ_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
361 360
 					QSG_ID INT UNSIGNED NOT NULL,
362 361
 					QST_ID INT UNSIGNED NOT NULL,
363 362
 					QGQ_order INT UNSIGNED NOT NULL DEFAULT 0,
364 363
 					PRIMARY KEY  (QGQ_ID),
365 364
 					KEY QST_ID (QST_ID),
366 365
 					KEY QSG_ID_order (QSG_ID, QGQ_order)";
367
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
368
-        $table_name = 'esp_question_option';
369
-        $sql = "QSO_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
366
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
367
+		$table_name = 'esp_question_option';
368
+		$sql = "QSO_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
370 369
 					QSO_value VARCHAR(255) NOT NULL,
371 370
 					QSO_desc TEXT NOT NULL,
372 371
 					QST_ID INT UNSIGNED NOT NULL,
@@ -375,9 +374,9 @@  discard block
 block discarded – undo
375 374
 					PRIMARY KEY  (QSO_ID),
376 375
 					KEY QST_ID (QST_ID),
377 376
 					KEY QSO_order (QSO_order)";
378
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
379
-        $table_name = 'esp_registration';
380
-        $sql = "REG_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
377
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
378
+		$table_name = 'esp_registration';
379
+		$sql = "REG_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
381 380
 					  EVT_ID BIGINT(20) UNSIGNED NOT NULL,
382 381
 					  ATT_ID BIGINT(20) UNSIGNED NOT NULL,
383 382
 					  TXN_ID INT(10) UNSIGNED NOT NULL,
@@ -401,18 +400,18 @@  discard block
 block discarded – undo
401 400
 					  KEY TKT_ID (TKT_ID),
402 401
 					  KEY EVT_ID (EVT_ID),
403 402
 					  KEY STS_ID (STS_ID)";
404
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
405
-        $table_name = 'esp_registration_payment';
406
-        $sql = "RPY_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
403
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
404
+		$table_name = 'esp_registration_payment';
405
+		$sql = "RPY_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
407 406
 					  REG_ID INT(10) UNSIGNED NOT NULL,
408 407
 					  PAY_ID INT(10) UNSIGNED NULL,
409 408
 					  RPY_amount DECIMAL(10,3) NOT NULL DEFAULT '0.00',
410 409
 					  PRIMARY KEY  (RPY_ID),
411 410
 					  KEY REG_ID (REG_ID),
412 411
 					  KEY PAY_ID (PAY_ID)";
413
-        $this->_table_is_new_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
414
-        $table_name = 'esp_checkin';
415
-        $sql = "CHK_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
412
+		$this->_table_is_new_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
413
+		$table_name = 'esp_checkin';
414
+		$sql = "CHK_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
416 415
 					REG_ID INT(10) UNSIGNED NOT NULL,
417 416
 					DTT_ID INT(10) UNSIGNED NOT NULL,
418 417
 					CHK_in TINYINT(1) UNSIGNED NOT NULL DEFAULT 1,
@@ -420,9 +419,9 @@  discard block
 block discarded – undo
420 419
 					PRIMARY KEY  (CHK_ID),
421 420
 					KEY REG_ID (REG_ID),
422 421
 					KEY DTT_ID (DTT_ID)";
423
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
424
-        $table_name = 'esp_state';
425
-        $sql = "STA_ID smallint(5) UNSIGNED NOT NULL AUTO_INCREMENT,
422
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
423
+		$table_name = 'esp_state';
424
+		$sql = "STA_ID smallint(5) UNSIGNED NOT NULL AUTO_INCREMENT,
426 425
 					  CNT_ISO VARCHAR(2) COLLATE utf8_bin NOT NULL,
427 426
 					  STA_abbrev VARCHAR(24) COLLATE utf8_bin NOT NULL,
428 427
 					  STA_name VARCHAR(100) COLLATE utf8_bin NOT NULL,
@@ -430,9 +429,9 @@  discard block
 block discarded – undo
430 429
 					  PRIMARY KEY  (STA_ID),
431 430
 					  KEY STA_abbrev (STA_abbrev),
432 431
 					  KEY CNT_ISO (CNT_ISO)";
433
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
434
-        $table_name = 'esp_status';
435
-        $sql = "STS_ID VARCHAR(3) COLLATE utf8_bin NOT NULL,
432
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
433
+		$table_name = 'esp_status';
434
+		$sql = "STS_ID VARCHAR(3) COLLATE utf8_bin NOT NULL,
436 435
 					  STS_code VARCHAR(45) COLLATE utf8_bin NOT NULL,
437 436
 					  STS_type set('event','registration','transaction','payment','email') COLLATE utf8_bin NOT NULL,
438 437
 					  STS_can_edit TINYINT(1) NOT NULL DEFAULT 0,
@@ -440,9 +439,9 @@  discard block
 block discarded – undo
440 439
 					  STS_open TINYINT(1) NOT NULL DEFAULT 1,
441 440
 					  UNIQUE KEY STS_ID_UNIQUE (STS_ID),
442 441
 					  KEY STS_type (STS_type)";
443
-        $this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
444
-        $table_name = 'esp_transaction';
445
-        $sql = "TXN_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
442
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
443
+		$table_name = 'esp_transaction';
444
+		$sql = "TXN_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
446 445
 					  TXN_timestamp DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
447 446
 					  TXN_total DECIMAL(10,3) DEFAULT '0.00',
448 447
 					  TXN_paid DECIMAL(10,3) NOT NULL DEFAULT '0.00',
@@ -454,9 +453,9 @@  discard block
 block discarded – undo
454 453
 					  PRIMARY KEY  (TXN_ID),
455 454
 					  KEY TXN_timestamp (TXN_timestamp),
456 455
 					  KEY STS_ID (STS_ID)";
457
-        $this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
458
-        $table_name = 'esp_venue_meta';
459
-        $sql = "VNUM_ID INT(11) NOT NULL AUTO_INCREMENT,
456
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
457
+		$table_name = 'esp_venue_meta';
458
+		$sql = "VNUM_ID INT(11) NOT NULL AUTO_INCREMENT,
460 459
 			VNU_ID BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
461 460
 			VNU_address VARCHAR(255) DEFAULT NULL,
462 461
 			VNU_address2 VARCHAR(255) DEFAULT NULL,
@@ -475,10 +474,10 @@  discard block
 block discarded – undo
475 474
 			KEY VNU_ID (VNU_ID),
476 475
 			KEY STA_ID (STA_ID),
477 476
 			KEY CNT_ISO (CNT_ISO)";
478
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
479
-        //modified tables
480
-        $table_name = "esp_price";
481
-        $sql = "PRC_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
477
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
478
+		//modified tables
479
+		$table_name = "esp_price";
480
+		$sql = "PRC_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
482 481
 					  PRT_ID TINYINT(3) UNSIGNED NOT NULL,
483 482
 					  PRC_amount DECIMAL(10,3) NOT NULL DEFAULT '0.00',
484 483
 					  PRC_name VARCHAR(245) NOT NULL,
@@ -491,9 +490,9 @@  discard block
 block discarded – undo
491 490
 					  PRC_parent INT(10) UNSIGNED DEFAULT 0,
492 491
 					  PRIMARY KEY  (PRC_ID),
493 492
 					  KEY PRT_ID (PRT_ID)";
494
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
495
-        $table_name = "esp_price_type";
496
-        $sql = "PRT_ID TINYINT(3) UNSIGNED NOT NULL AUTO_INCREMENT,
493
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
494
+		$table_name = "esp_price_type";
495
+		$sql = "PRT_ID TINYINT(3) UNSIGNED NOT NULL AUTO_INCREMENT,
497 496
 				  PRT_name VARCHAR(45) NOT NULL,
498 497
 				  PBT_ID TINYINT(3) UNSIGNED NOT NULL DEFAULT '1',
499 498
 				  PRT_is_percent TINYINT(1) NOT NULL DEFAULT '0',
@@ -502,9 +501,9 @@  discard block
 block discarded – undo
502 501
 				  PRT_deleted TINYINT(1) NOT NULL DEFAULT '0',
503 502
 				  UNIQUE KEY PRT_name_UNIQUE (PRT_name),
504 503
 				  PRIMARY KEY  (PRT_ID)";
505
-        $this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB ');
506
-        $table_name = "esp_ticket";
507
-        $sql = "TKT_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
504
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB ');
505
+		$table_name = "esp_ticket";
506
+		$sql = "TKT_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
508 507
 					  TTM_ID INT(10) UNSIGNED NOT NULL,
509 508
 					  TKT_name VARCHAR(245) NOT NULL DEFAULT '',
510 509
 					  TKT_description TEXT NOT NULL,
@@ -526,9 +525,9 @@  discard block
 block discarded – undo
526 525
 					  TKT_deleted TINYINT(1) NOT NULL DEFAULT '0',
527 526
 					  PRIMARY KEY  (TKT_ID),
528 527
 					  KEY TKT_start_date (TKT_start_date)";
529
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
530
-        $table_name = 'esp_question_group';
531
-        $sql = 'QSG_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
528
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
529
+		$table_name = 'esp_question_group';
530
+		$sql = 'QSG_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
532 531
 					QSG_name VARCHAR(255) NOT NULL,
533 532
 					QSG_identifier VARCHAR(100) NOT NULL,
534 533
 					QSG_desc TEXT NULL,
@@ -541,38 +540,38 @@  discard block
 block discarded – undo
541 540
 					PRIMARY KEY  (QSG_ID),
542 541
 					UNIQUE KEY QSG_identifier_UNIQUE (QSG_identifier),
543 542
 					KEY QSG_order (QSG_order)';
544
-        $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
545
-        /** @var EE_DMS_Core_4_1_0 $script_4_1_defaults */
546
-        $script_4_1_defaults = EE_Registry::instance()->load_dms('Core_4_1_0');
547
-        //(because many need to convert old string states to foreign keys into the states table)
548
-        $script_4_1_defaults->insert_default_states();
549
-        $script_4_1_defaults->insert_default_countries();
550
-        /** @var EE_DMS_Core_4_5_0 $script_4_5_defaults */
551
-        $script_4_5_defaults = EE_Registry::instance()->load_dms('Core_4_5_0');
552
-        $script_4_5_defaults->insert_default_price_types();
553
-        $script_4_5_defaults->insert_default_prices();
554
-        $script_4_5_defaults->insert_default_tickets();
555
-        /** @var EE_DMS_Core_4_6_0 $script_4_6_defaults */
556
-        $script_4_6_defaults = EE_Registry::instance()->load_dms('Core_4_6_0');
557
-        $script_4_6_defaults->add_default_admin_only_payments();
558
-        $script_4_6_defaults->insert_default_currencies();
559
-        return true;
560
-    }
543
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
544
+		/** @var EE_DMS_Core_4_1_0 $script_4_1_defaults */
545
+		$script_4_1_defaults = EE_Registry::instance()->load_dms('Core_4_1_0');
546
+		//(because many need to convert old string states to foreign keys into the states table)
547
+		$script_4_1_defaults->insert_default_states();
548
+		$script_4_1_defaults->insert_default_countries();
549
+		/** @var EE_DMS_Core_4_5_0 $script_4_5_defaults */
550
+		$script_4_5_defaults = EE_Registry::instance()->load_dms('Core_4_5_0');
551
+		$script_4_5_defaults->insert_default_price_types();
552
+		$script_4_5_defaults->insert_default_prices();
553
+		$script_4_5_defaults->insert_default_tickets();
554
+		/** @var EE_DMS_Core_4_6_0 $script_4_6_defaults */
555
+		$script_4_6_defaults = EE_Registry::instance()->load_dms('Core_4_6_0');
556
+		$script_4_6_defaults->add_default_admin_only_payments();
557
+		$script_4_6_defaults->insert_default_currencies();
558
+		return true;
559
+	}
561 560
 
562 561
 
563 562
 
564
-    /**
565
-     * @return boolean
566
-     */
567
-    public function schema_changes_after_migration()
568
-    {
569
-        return true;
570
-    }
563
+	/**
564
+	 * @return boolean
565
+	 */
566
+	public function schema_changes_after_migration()
567
+	{
568
+		return true;
569
+	}
571 570
 
572 571
 
573 572
 
574
-    public function migration_page_hooks()
575
-    {
576
-    }
573
+	public function migration_page_hooks()
574
+	{
575
+	}
577 576
 }
578 577
 // end of file: /core/data_migration_scripts/EE_DMS_Core_4_7_0.dms.php
579 578
\ No newline at end of file
Please login to merge, or discard this patch.