How to use ensureColumn method of Location class

Best Cucumber Common Library code snippet using Location.ensureColumn

2019-06-06 09-00-00.php

Source:2019-06-06 09-00-00.php Github

copy

Full Screen

2$sql = rex_sql::factory();3$sql->setQuery('SET FOREIGN_KEY_CHECKS = 0');4try {5 rex_sql_table::get('rex_prj_country')6 ->ensureColumn(new rex_sql_column('id', 'int(11)', false, null, 'auto_increment'))7 ->ensureColumn(new rex_sql_column('name_1', 'text', false, null, null))8 ->ensureColumn(new rex_sql_column('name_2', 'text', false, null, null))9 ->ensureColumn(new rex_sql_column('name_3', 'text', false, null, null))10 ->ensureColumn(new rex_sql_column('name_4', 'text', false, null, null))11 ->ensureColumn(new rex_sql_column('prio', 'int(11)', false, null, null))12 ->ensureColumn(new rex_sql_column('status', 'text', false, null, null))13 ->ensureColumn(new rex_sql_column('iso2', 'text', false, null, null))14 ->ensureColumn(new rex_sql_column('iso3', 'text', false, null, null))15 ->setPrimaryKey(['id'])16 ->ensure();17 rex_sql_table::get('rex_shop_category')18 ->ensureColumn(new rex_sql_column('id', 'int(10) unsigned', false, null, 'auto_increment'))19 ->ensureColumn(new rex_sql_column('name_1', 'varchar(191)', false, null, null))20 ->ensureColumn(new rex_sql_column('text_1', 'text', false, null, null))21 ->ensureColumn(new rex_sql_column('name_2', 'varchar(191)', false, null, null))22 ->ensureColumn(new rex_sql_column('text_2', 'text', false, null, null))23 ->ensureColumn(new rex_sql_column('name_3', 'varchar(191)', false, null, null))24 ->ensureColumn(new rex_sql_column('text_3', 'text', false, null, null))25 ->ensureColumn(new rex_sql_column('parent_id', 'text', false, null, null))26 ->ensureColumn(new rex_sql_column('subcategories', 'text', false, null, null))27 ->ensureColumn(new rex_sql_column('status', 'int(11)', false, null, null))28 ->ensureColumn(new rex_sql_column('prio', 'int(11)', false, null, null))29 ->ensureColumn(new rex_sql_column('createdate', 'datetime', false, null, null))30 ->ensureColumn(new rex_sql_column('updatedate', 'datetime', false, null, null))31 ->setPrimaryKey(['id'])32 ->ensure();33 rex_sql_table::get('rex_shop_coupon')34 ->ensureColumn(new rex_sql_column('id', 'int(10) unsigned', false, null, 'auto_increment'))35 ->ensureColumn(new rex_sql_column('name_1', 'varchar(191)', false, null, null))36 ->ensureColumn(new rex_sql_column('name_2', 'varchar(191)', false, null, null))37 ->ensureColumn(new rex_sql_column('name_3', 'varchar(191)', false, null, null))38 ->ensureColumn(new rex_sql_column('name_4', 'varchar(191)', false, null, null))39 ->ensureColumn(new rex_sql_column('given_away', 'tinyint(1)', false, null, null))40 ->ensureColumn(new rex_sql_column('start_time', 'date', false, null, null))41 ->ensureColumn(new rex_sql_column('discount_value', 'decimal(10,2)', true, null, null))42 ->ensureColumn(new rex_sql_column('discount_percent', 'decimal(4,1)', true, null, null))43 ->ensureColumn(new rex_sql_column('prefix', 'varchar(191)', false, null, null))44 ->ensureColumn(new rex_sql_column('code', 'text', false, null, null))45 ->ensureColumn(new rex_sql_column('orders', 'text', false, null, null))46 ->ensureColumn(new rex_sql_column('createdate', 'datetime', false, null, null))47 ->ensureColumn(new rex_sql_column('updatedate', 'datetime', false, null, null))48 ->setPrimaryKey(['id'])49 ->ensure();50 rex_sql_table::get('rex_shop_customer')51 ->ensureColumn(new rex_sql_column('id', 'int(10) unsigned', false, null, 'auto_increment'))52 ->ensureColumn(new rex_sql_column('lang_id', 'text', false, null, null))53 ->ensureColumn(new rex_sql_column('ctype', 'text', false, null, null))54 ->ensureColumn(new rex_sql_column('company_name', 'text', false, null, null))55 ->ensureColumn(new rex_sql_column('firstname', 'varchar(191)', false, null, null))56 ->ensureColumn(new rex_sql_column('lastname', 'varchar(191)', false, null, null))57 ->ensureColumn(new rex_sql_column('email', 'varchar(191)', false, null, null))58 ->ensureColumn(new rex_sql_column('password', 'varchar(191)', false, null, null))59 ->ensureColumn(new rex_sql_column('password_hash', 'text', false, null, null))60 ->ensureColumn(new rex_sql_column('fiscal_code', 'varchar(191)', false, null, null))61 ->ensureColumn(new rex_sql_column('vat_num', 'text', false, null, null))62 ->ensureColumn(new rex_sql_column('lastlogin', 'datetime', false, null, null))63 ->ensureColumn(new rex_sql_column('status', 'text', false, null, null))64 ->ensureColumn(new rex_sql_column('updatedate', 'datetime', false, null, null))65 ->ensureColumn(new rex_sql_column('created', 'datetime', false, null, null))66 ->setPrimaryKey(['id'])67 ->ensure();68 rex_sql_table::get('rex_shop_customer_address')69 ->ensureColumn(new rex_sql_column('id', 'int(10) unsigned', false, null, 'auto_increment'))70 ->ensureColumn(new rex_sql_column('customer_id', 'text', false, null, null))71 ->ensureColumn(new rex_sql_column('company_name', 'varchar(191)', false, null, null))72 ->ensureColumn(new rex_sql_column('firstname', 'varchar(191)', false, null, null))73 ->ensureColumn(new rex_sql_column('lastname', 'varchar(191)', false, null, null))74 ->ensureColumn(new rex_sql_column('street', 'varchar(191)', false, null, null))75 ->ensureColumn(new rex_sql_column('street_additional', 'varchar(191)', false, null, null))76 ->ensureColumn(new rex_sql_column('location', 'varchar(191)', false, null, null))77 ->ensureColumn(new rex_sql_column('province', 'varchar(191)', false, null, null))78 ->ensureColumn(new rex_sql_column('postal', 'varchar(191)', false, null, null))79 ->ensureColumn(new rex_sql_column('country', 'text', false, null, null))80 ->ensureColumn(new rex_sql_column('status', 'int(11)', false, null, null))81 ->ensureColumn(new rex_sql_column('createdate', 'datetime', false, null, null))82 ->ensureColumn(new rex_sql_column('updatedate', 'datetime', false, null, null))83 ->setPrimaryKey(['id'])84 ->ensure();85 rex_sql_table::get('rex_shop_discount_group')86 ->ensureColumn(new rex_sql_column('id', 'int(10) unsigned', false, null, 'auto_increment'))87 ->ensureColumn(new rex_sql_column('name_1', 'varchar(191)', false, null, null))88 ->ensureColumn(new rex_sql_column('name_2', 'varchar(191)', false, null, null))89 ->ensureColumn(new rex_sql_column('name_3', 'varchar(191)', false, null, null))90 ->ensureColumn(new rex_sql_column('name_4', 'varchar(191)', false, null, null))91 ->ensureColumn(new rex_sql_column('ctype', 'text', false, null, null))92 ->ensureColumn(new rex_sql_column('price', 'decimal(10,2)', true, null, null))93 ->ensureColumn(new rex_sql_column('amount', 'int(11)', true, null, null))94 ->ensureColumn(new rex_sql_column('discount_percent', 'int(11)', true, null, null))95 ->ensureColumn(new rex_sql_column('discount_value', 'decimal(10,2)', true, null, null))96 ->ensureColumn(new rex_sql_column('free_shipping', 'tinyint(1)', false, null, null))97 ->ensureColumn(new rex_sql_column('status', 'int(11)', false, null, null))98 ->ensureColumn(new rex_sql_column('prio', 'int(11)', false, null, null))99 ->ensureColumn(new rex_sql_column('createdate', 'datetime', false, null, null))100 ->ensureColumn(new rex_sql_column('updatedate', 'datetime', false, null, null))101 ->setPrimaryKey(['id'])102 ->ensure();103 rex_sql_table::get('rex_shop_feature')104 ->ensureColumn(new rex_sql_column('id', 'int(10) unsigned', false, null, 'auto_increment'))105 ->ensureColumn(new rex_sql_column('name_1', 'varchar(191)', false, null, null))106 ->ensureColumn(new rex_sql_column('name_2', 'varchar(191)', false, null, null))107 ->ensureColumn(new rex_sql_column('name_3', 'varchar(191)', false, null, null))108 ->ensureColumn(new rex_sql_column('name_4', 'varchar(191)', false, null, null))109 ->ensureColumn(new rex_sql_column('key', 'varchar(191)', false, null, null))110 ->ensureColumn(new rex_sql_column('status', 'int(11)', false, null, null))111 ->ensureColumn(new rex_sql_column('prio', 'int(11)', false, null, null))112 ->ensureColumn(new rex_sql_column('createdate', 'datetime', false, null, null))113 ->ensureColumn(new rex_sql_column('updatedate', 'datetime', false, null, null))114 ->setPrimaryKey(['id'])115 ->ensure();116 rex_sql_table::get('rex_shop_feature_values')117 ->ensureColumn(new rex_sql_column('id', 'int(10) unsigned', false, null, 'auto_increment'))118 ->ensureColumn(new rex_sql_column('name_1', 'varchar(191)', false, null, null))119 ->ensureColumn(new rex_sql_column('name_2', 'varchar(191)', false, null, null))120 ->ensureColumn(new rex_sql_column('name_3', 'varchar(191)', false, null, null))121 ->ensureColumn(new rex_sql_column('name_4', 'varchar(191)', false, null, null))122 ->ensureColumn(new rex_sql_column('feature_id', 'text', false, null, null))123 ->ensureColumn(new rex_sql_column('key', 'varchar(191)', false, null, null))124 ->ensureColumn(new rex_sql_column('status', 'int(11)', false, null, null))125 ->ensureColumn(new rex_sql_column('prio', 'int(11)', false, null, null))126 ->ensureColumn(new rex_sql_column('createdate', 'datetime', false, null, null))127 ->ensureColumn(new rex_sql_column('updatedate', 'datetime', false, null, null))128 ->setPrimaryKey(['id'])129 ->ensure();130 rex_sql_table::get('rex_shop_order')131 ->ensureColumn(new rex_sql_column('id', 'int(10) unsigned', false, null, 'auto_increment'))132 ->ensureColumn(new rex_sql_column('customer_id', 'text', false, null, null))133 ->ensureColumn(new rex_sql_column('invoice_num', 'text', false, null, null))134 ->ensureColumn(new rex_sql_column('ref_order_id', 'text', false, null, null))135 ->ensureColumn(new rex_sql_column('status', 'text', false, null, null))136 ->ensureColumn(new rex_sql_column('initial_total', 'decimal(10,2)', true, null, null))137 ->ensureColumn(new rex_sql_column('brut_prices', 'text', false, null, null))138 ->ensureColumn(new rex_sql_column('taxes', 'text', false, null, null))139 ->ensureColumn(new rex_sql_column('net_prices', 'text', false, null, null))140 ->ensureColumn(new rex_sql_column('shipping_costs', 'decimal(10,2)', true, null, null))141 ->ensureColumn(new rex_sql_column('discount', 'decimal(10,2)', true, null, null))142 ->ensureColumn(new rex_sql_column('manual_discount', 'decimal(10,2)', true, null, null))143 ->ensureColumn(new rex_sql_column('total', 'decimal(10,2)', true, null, null))144 ->ensureColumn(new rex_sql_column('quantity', 'int(11)', true, null, null))145 ->ensureColumn(new rex_sql_column('promotions', 'text', false, null, null))146 ->ensureColumn(new rex_sql_column('customer_data', 'text', false, null, null))147 ->ensureColumn(new rex_sql_column('invoice_address', 'text', false, null, null))148 ->ensureColumn(new rex_sql_column('shipping_address', 'text', false, null, null))149 ->ensureColumn(new rex_sql_column('payment', 'text', false, null, null))150 ->ensureColumn(new rex_sql_column('shipping', 'text', false, null, null))151 ->ensureColumn(new rex_sql_column('shipping_key', 'varchar(191)', false, null, null))152 ->ensureColumn(new rex_sql_column('extras', 'text', false, null, null))153 ->ensureColumn(new rex_sql_column('ip_address', 'varchar(191)', false, null, null))154 ->ensureColumn(new rex_sql_column('notes', 'text', false, null, null))155 ->ensureColumn(new rex_sql_column('createdate', 'datetime', false, null, null))156 ->ensureColumn(new rex_sql_column('updatedate', 'datetime', false, null, null))157 ->setPrimaryKey(['id'])158 ->ensure();159 rex_sql_table::get('rex_shop_order_products')160 ->ensureColumn(new rex_sql_column('id', 'int(10) unsigned', false, null, 'auto_increment'))161 ->ensureColumn(new rex_sql_column('order_id', 'text', false, null, null))162 ->ensureColumn(new rex_sql_column('product_id', 'text', false, null, null))163 ->ensureColumn(new rex_sql_column('code', 'varchar(191)', false, null, null))164 ->ensureColumn(new rex_sql_column('cart_quantity', 'int(11)', true, null, null))165 ->ensureColumn(new rex_sql_column('data', 'text', false, null, null))166 ->ensureColumn(new rex_sql_column('shipping_key', 'varchar(191)', false, null, null))167 ->ensureColumn(new rex_sql_column('createdate', 'datetime', false, null, null))168 ->ensureColumn(new rex_sql_column('updatedate', 'datetime', false, null, null))169 ->setPrimaryKey(['id'])170 ->ensure();171 rex_sql_table::get('rex_shop_package')172 ->ensureColumn(new rex_sql_column('id', 'int(10) unsigned', false, null, 'auto_increment'))173 ->ensureColumn(new rex_sql_column('name_1', 'varchar(191)', false, null, null))174 ->ensureColumn(new rex_sql_column('description_1', 'text', false, null, null))175 ->ensureColumn(new rex_sql_column('name_2', 'varchar(191)', false, null, null))176 ->ensureColumn(new rex_sql_column('description_2', 'text', false, null, null))177 ->ensureColumn(new rex_sql_column('name_3', 'varchar(191)', false, null, null))178 ->ensureColumn(new rex_sql_column('description_3', 'text', false, null, null))179 ->ensureColumn(new rex_sql_column('name_4', 'varchar(191)', false, null, null))180 ->ensureColumn(new rex_sql_column('description_4', 'text', false, null, null))181 ->ensureColumn(new rex_sql_column('products', 'text', false, null, null))182 ->ensureColumn(new rex_sql_column('code', 'varchar(191)', false, null, null))183 ->ensureColumn(new rex_sql_column('status', 'int(11)', false, null, null))184 ->ensureColumn(new rex_sql_column('prio', 'int(11)', false, null, null))185 ->ensureColumn(new rex_sql_column('createdate', 'datetime', false, null, null))186 ->ensureColumn(new rex_sql_column('updatedate', 'datetime', false, null, null))187 ->setPrimaryKey(['id'])188 ->ensure();189 rex_sql_table::get('rex_shop_product')190 ->ensureColumn(new rex_sql_column('id', 'int(10) unsigned', false, null, 'auto_increment'))191 ->ensureColumn(new rex_sql_column('name_1', 'varchar(191)', false, null, null))192 ->ensureColumn(new rex_sql_column('subtitle_1', 'varchar(191)', false, null, null))193 ->ensureColumn(new rex_sql_column('short_description_1', 'text', false, null, null))194 ->ensureColumn(new rex_sql_column('description_1', 'text', false, null, null))195 ->ensureColumn(new rex_sql_column('name_2', 'varchar(191)', false, null, null))196 ->ensureColumn(new rex_sql_column('subtitle_2', 'varchar(191)', false, null, null))197 ->ensureColumn(new rex_sql_column('short_description_2', 'text', false, null, null))198 ->ensureColumn(new rex_sql_column('description_2', 'text', false, null, null))199 ->ensureColumn(new rex_sql_column('name_3', 'varchar(191)', false, null, null))200 ->ensureColumn(new rex_sql_column('subtitle_3', 'varchar(191)', false, null, null))201 ->ensureColumn(new rex_sql_column('short_description_3', 'text', false, null, null))202 ->ensureColumn(new rex_sql_column('description_3', 'text', false, null, null))203 ->ensureColumn(new rex_sql_column('name_4', 'varchar(191)', false, null, null))204 ->ensureColumn(new rex_sql_column('subtitle_4', 'varchar(191)', false, null, null))205 ->ensureColumn(new rex_sql_column('short_description_4', 'text', false, null, null))206 ->ensureColumn(new rex_sql_column('description_4', 'text', false, null, null))207 ->ensureColumn(new rex_sql_column('type', 'text', false, null, null))208 ->ensureColumn(new rex_sql_column('hashtag', 'varchar(191)', false, null, null))209 ->ensureColumn(new rex_sql_column('video', 'varchar(191)', false, null, null))210 ->ensureColumn(new rex_sql_column('code', 'varchar(191)', false, null, null))211 ->ensureColumn(new rex_sql_column('category', 'text', false, null, null))212 ->ensureColumn(new rex_sql_column('optionals', 'text', false, null, null))213 ->ensureColumn(new rex_sql_column('category_id', 'text', false, null, null))214 ->ensureColumn(new rex_sql_column('images', 'text', false, null, null))215 ->ensureColumn(new rex_sql_column('inventory', 'text', false, null, null))216 ->ensureColumn(new rex_sql_column('amount', 'varchar(191)', false, null, null))217 ->ensureColumn(new rex_sql_column('b2b_sale_amount', 'varchar(191)', false, null, null))218 ->ensureColumn(new rex_sql_column('price', 'varchar(191)', false, null, null))219 ->ensureColumn(new rex_sql_column('reduced_price', 'varchar(191)', false, null, null))220 ->ensureColumn(new rex_sql_column('tax', 'text', false, null, null))221 ->ensureColumn(new rex_sql_column('length', 'text', false, null, null))222 ->ensureColumn(new rex_sql_column('width', 'text', false, null, null))223 ->ensureColumn(new rex_sql_column('height', 'text', false, null, null))224 ->ensureColumn(new rex_sql_column('weight', 'text', false, null, null))225 ->ensureColumn(new rex_sql_column('features', 'text', false, null, null))226 ->ensureColumn(new rex_sql_column('related_products', 'text', false, null, null))227 ->ensureColumn(new rex_sql_column('status', 'text', false, null, null))228 ->ensureColumn(new rex_sql_column('prio', 'int(11)', false, null, null))229 ->ensureColumn(new rex_sql_column('createdate', 'datetime', false, null, null))230 ->ensureColumn(new rex_sql_column('updatedate', 'datetime', false, null, null))231 ->setPrimaryKey(['id'])232 ->ensure();233 rex_sql_table::get('rex_shop_product_has_category')234 ->ensureColumn(new rex_sql_column('id', 'int(10) unsigned', false, null, 'auto_increment'))235 ->ensureColumn(new rex_sql_column('product_id', 'text', false, null, null))236 ->ensureColumn(new rex_sql_column('category_id', 'text', false, null, null))237 ->ensureColumn(new rex_sql_column('prio', 'int(11)', false, null, null))238 ->ensureColumn(new rex_sql_column('createdate', 'datetime', false, null, null))239 ->ensureColumn(new rex_sql_column('updatedate', 'datetime', false, null, null))240 ->setPrimaryKey(['id'])241 ->ensure();242 rex_sql_table::get('rex_shop_product_has_feature')243 ->ensureColumn(new rex_sql_column('id', 'int(10) unsigned', false, null, 'auto_increment'))244 ->ensureColumn(new rex_sql_column('type', 'text', false, null, null))245 ->ensureColumn(new rex_sql_column('name_1', 'varchar(191)', false, null, null))246 ->ensureColumn(new rex_sql_column('material_1', 'varchar(191)', false, null, null))247 ->ensureColumn(new rex_sql_column('name_2', 'varchar(191)', false, null, null))248 ->ensureColumn(new rex_sql_column('material_2', 'varchar(191)', false, null, null))249 ->ensureColumn(new rex_sql_column('name_3', 'varchar(191)', false, null, null))250 ->ensureColumn(new rex_sql_column('material_3', 'varchar(191)', false, null, null))251 ->ensureColumn(new rex_sql_column('product_id', 'text', false, null, null))252 ->ensureColumn(new rex_sql_column('variant_key', 'varchar(191)', false, null, null))253 ->ensureColumn(new rex_sql_column('code', 'varchar(191)', false, null, null))254 ->ensureColumn(new rex_sql_column('amount', 'int(11)', true, null, null))255 ->ensureColumn(new rex_sql_column('price', 'decimal(10,2)', true, null, null))256 ->ensureColumn(new rex_sql_column('images', 'text', false, null, null))257 ->ensureColumn(new rex_sql_column('material_image', 'text', false, null, null))258 ->ensureColumn(new rex_sql_column('prio', 'int(11)', false, null, null))259 ->ensureColumn(new rex_sql_column('createdate', 'datetime', false, null, null))260 ->ensureColumn(new rex_sql_column('updatedate', 'datetime', false, null, null))261 ->setPrimaryKey(['id'])262 ->ensure();263 rex_sql_table::get('rex_shop_session')264 ->ensureColumn(new rex_sql_column('id', 'int(10) unsigned', false, null, 'auto_increment'))265 ->ensureColumn(new rex_sql_column('customer_id', 'text', false, null, null))266 ->ensureColumn(new rex_sql_column('session_id', 'varchar(191)', false, null, null))267 ->ensureColumn(new rex_sql_column('last_url', 'text', false, null, null))268 ->ensureColumn(new rex_sql_column('cart_items', 'text', false, null, null))269 ->ensureColumn(new rex_sql_column('last_cart_update', 'datetime', false, null, null))270 ->ensureColumn(new rex_sql_column('createdate', 'datetime', false, null, null))271 ->ensureColumn(new rex_sql_column('lastupdate', 'datetime', false, null, null))272 ->setPrimaryKey(['id'])273 ->ensure();274 rex_sql_table::get('rex_shop_tax')275 ->ensureColumn(new rex_sql_column('id', 'int(10) unsigned', false, null, 'auto_increment'))276 ->ensureColumn(new rex_sql_column('updatedate', 'datetime', false, null, null))277 ->ensureColumn(new rex_sql_column('createdate', 'datetime', false, null, null))278 ->ensureColumn(new rex_sql_column('prio', 'int(11)', false, null, null))279 ->ensureColumn(new rex_sql_column('status', 'int(11)', false, null, null))280 ->ensureColumn(new rex_sql_column('tax', 'int(11)', true, null, null))281 ->setPrimaryKey(['id'])282 ->ensure();283 rex_sql_table::get('rex_yform_field')284 ->ensureColumn(new rex_sql_column('scale', 'text', false, null, null), 'not_required')285 ->ensureColumn(new rex_sql_column('options', 'text', false, null, null), 'scale')286 ->ensureColumn(new rex_sql_column('default', 'text', false, null, null), 'options')287 ->ensureColumn(new rex_sql_column('no_db', 'text', false, null, null), 'default')288 ->ensureColumn(new rex_sql_column('type', 'text', false, null, null), 'no_db')289 ->ensureColumn(new rex_sql_column('message', 'text', false, null, null), 'type')290 ->ensureColumn(new rex_sql_column('empty_value', 'text', false, null, null), 'message')291 ->ensureColumn(new rex_sql_column('notice', 'text', false, null, null), 'empty_value')292 ->ensureColumn(new rex_sql_column('format', 'text', false, null, null), 'notice')293 ->ensureColumn(new rex_sql_column('only_empty', 'text', false, null, null), 'format')294 ->ensureColumn(new rex_sql_column('fields', 'text', false, null, null), 'only_empty')295 ->ensureColumn(new rex_sql_column('table', 'text', false, null, null), 'fields')296 ->ensureColumn(new rex_sql_column('field', 'text', false, null, null), 'table')297 ->ensureColumn(new rex_sql_column('empty_option', 'text', false, null, null), 'field')298 ->ensureColumn(new rex_sql_column('widget', 'text', false, null, null), 'empty_option')299 ->ensureColumn(new rex_sql_column('attributes', 'text', false, null, null), 'widget')300 ->ensureColumn(new rex_sql_column('preview', 'text', false, null, null), 'attributes')301 ->ensureColumn(new rex_sql_column('multiple', 'text', false, null, null), 'preview')302 ->ensureColumn(new rex_sql_column('values', 'text', false, null, null), 'multiple')303 ->ensureColumn(new rex_sql_column('relation_table', 'text', false, null, null), 'values')304 ->ensureColumn(new rex_sql_column('function', 'text', false, null, null), 'relation_table')305 ->ensureColumn(new rex_sql_column('salt', 'text', false, null, null), 'function')306 ->ensureColumn(new rex_sql_column('filter', 'text', false, null, null), 'salt')307 ->ensureColumn(new rex_sql_column('current_date', 'text', false, null, null), 'filter')308 ->ensureColumn(new rex_sql_column('html', 'text', false, null, null), 'current_date')309 ->ensureColumn(new rex_sql_column('show_value', 'text', false, null, null), 'html')310 ->ensureColumn(new rex_sql_column('params', 'text', false, null, null), 'show_value')311 ->ensureColumn(new rex_sql_column('rules', 'text', false, null, null), 'params')312 ->ensureColumn(new rex_sql_column('precision', 'text', false, null, null), 'rules')313 ->ensureColumn(new rex_sql_column('choices', 'text', false, null, null), 'precision')314 ->ensureColumn(new rex_sql_column('expanded', 'text', false, null, null), 'choices')315 ->ensureColumn(new rex_sql_column('unit', 'text', false, null, null), 'expanded')316 ->ensureColumn(new rex_sql_column('validate_type', 'text', false, null, null), 'unit')317 ->alter();318 $sql->setQuery(<<<'SQL'319 INSERT INTO `rex_yform_field` (`table_name`, `prio`, `type_id`, `type_name`, `db_type`, `list_hidden`, `search`, `name`, `label`, `not_required`, `scale`, `options`, `default`, `no_db`, `type`, `message`, `empty_value`, `notice`, `format`, `only_empty`, `fields`, `table`, `field`, `empty_option`, `widget`, `attributes`, `preview`, `multiple`, `values`, `relation_table`, `function`, `salt`, `filter`, `current_date`, `html`, `show_value`, `params`, `rules`, `precision`, `choices`, `expanded`, `unit`, `validate_type`)320 VALUES321 ('rex_shop_category', 1, 'value', 'tab_start', 'none', 0, 0, 'tab_start', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),322 ('rex_shop_category', 2, 'value', 'text', 'varchar(191)', 0, 1, 'name_1', 'Bezeichnung', '', '', '', '', 0, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),323 ('rex_shop_category', 3, 'value', 'textarea', 'text', 1, 0, 'text_1', 'Beschreibung', '', '', '', '', 0, '', '', '', '', '', '', '', '', '', '', '', '{\"class\":\"tinyMCEEditor\"}', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),324 ('rex_shop_category', 4, 'value', 'tab_break', 'none', 0, 0, 'tab_break_1', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),325 ('rex_shop_category', 5, 'value', 'text', 'varchar(191)', 1, 1, 'name_2', 'Bezeichnung', '', '', '', '', 0, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),326 ('rex_shop_category', 6, 'value', 'textarea', 'text', 1, 0, 'text_2', 'Beschreibung', '', '', '', '', 0, '', '', '', '', '', '', '', '', '', '', '', '{\"class\":\"tinyMCEEditor\"}', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),327 ('rex_shop_category', 7, 'value', 'tab_break', 'none', 0, 0, 'tab_break_2', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),328 ('rex_shop_category', 8, 'value', 'text', 'varchar(191)', 1, 0, 'name_3', 'Bezeichnung', '', '', '', '', 0, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),329 ('rex_shop_category', 9, 'value', 'textarea', 'text', 1, 0, 'text_3', 'Beschreibung', '', '', '', '', 0, '', '', '', '', '', '', '', '', '', '', '', '{\"class\":\"tinyMCEEditor\"}', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),330 ('rex_shop_category', 10, 'value', 'tab_end', 'none', 0, 0, 'tab_end', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),...

Full Screen

Full Screen

install.php

Source:install.php Github

copy

Full Screen

1<?php2\rex_sql_table::get(\rex::getTable('d2u_courses_location_categories'))3 ->ensureColumn(new rex_sql_column('location_category_id', 'INT(11) unsigned', false, null, 'auto_increment'))4 ->setPrimaryKey('location_category_id')5 ->ensureColumn(new \rex_sql_column('name', 'VARCHAR(255)', true))6 ->ensureColumn(new \rex_sql_column('picture', 'VARCHAR(255)', true))7 ->ensureColumn(new \rex_sql_column('zoom_level', 'INT(10)', true))8 ->ensureColumn(new \rex_sql_column('updatedate', 'DATETIME'))9 ->ensure();10\rex_sql_table::get(\rex::getTable('d2u_courses_locations'))11 ->ensureColumn(new rex_sql_column('location_id', 'INT(11) unsigned', false, null, 'auto_increment'))12 ->setPrimaryKey('location_id')13 ->ensureColumn(new \rex_sql_column('name', 'VARCHAR(255)', true))14 ->ensureColumn(new \rex_sql_column('latitude', 'DECIMAL(14,10)', true, 0))15 ->ensureColumn(new \rex_sql_column('longitude', 'DECIMAL(14,10)', true, 0))16 ->ensureColumn(new \rex_sql_column('street', 'VARCHAR(255)', true))17 ->ensureColumn(new \rex_sql_column('zip_code', 'VARCHAR(10)', true))18 ->ensureColumn(new \rex_sql_column('city', 'VARCHAR(255)', true))19 ->ensureColumn(new \rex_sql_column('country_code', 'VARCHAR(3)', true))20 ->ensureColumn(new \rex_sql_column('picture', 'VARCHAR(255)', true))21 ->ensureColumn(new \rex_sql_column('site_plan', 'VARCHAR(255)', true))22 ->ensureColumn(new \rex_sql_column('location_category_id', 'INT(11)', true))23 ->ensureColumn(new \rex_sql_column('redaxo_users', 'TEXT', true))24 ->ensureColumn(new \rex_sql_column('updatedate', 'DATETIME'))25 ->ensure();26rex_sql_table::get(rex::getTable('d2u_courses_courses'))27 ->ensureColumn(new \rex_sql_column('location_id', 'INT(11)', true, null))28 ->ensureColumn(new \rex_sql_column('room', 'VARCHAR(255)', true, null))29 ->alter();30// START create views for url addon31$sql = rex_sql::factory();32// Online locations (changes need to be done here and addon pages/settings.php)33$sql->setQuery('CREATE OR REPLACE VIEW '. rex::getTablePrefix() .'d2u_courses_url_locations AS34 SELECT locations.location_id, locations.name, locations.name AS seo_title, locations.picture, courses.updatedate, locations.location_category_id35 FROM '. rex::getTablePrefix() .'d2u_courses_courses AS courses36 LEFT JOIN '. rex::getTablePrefix() .'d2u_courses_locations AS locations37 ON courses.location_id = locations.location_id38 WHERE courses.online_status = "online"39 AND ('. d2u_courses_frontend_helper::getShowTimeWhere() .')40 AND courses.updatedate = (41 SELECT MAX(courses_max.updatedate) FROM '. rex::getTablePrefix() .'d2u_courses_courses AS courses_max42 WHERE locations.location_id = courses_max.location_id AND courses_max.online_status = "online" AND ('. d2u_courses_frontend_helper::getShowTimeWhere() .')...

Full Screen

Full Screen

ensureColumn

Using AI Code Generation

copy

Full Screen

1require_once 'Location.php';2$loc = new Location();3$loc->ensureColumn('city', 'varchar(32)');4$loc->ensureColumn('state', 'varchar(32)');5$loc->ensureColumn('zip', 'varchar(32)');6$loc->ensureColumn('country', 'varchar(32)');7$loc->ensureColumn('lat', 'varchar(32)');8$loc->ensureColumn('lng', 'varchar(32)');9public function geocode($address) {10 $response = file_get_contents($url);11 if ($json['status'] == 'OK') {12 $this->city = $json['results'][0]['address_components'][2]['long_name'];13 $this->state = $json['results'][0]['address_components'][4]['short_name'];14 $this->zip = $json['results'][0]['address_components'][6]['long_name'];15 $this->country = $json['results'][0]['address_components'][5]['long_name'];16 $this->lat = $json['results'][0]['geometry']['location']['lat'];17 $this->lng = $json['results'][0]['geometry']['location']['lng'];18 return TRUE;19 } else {20 return FALSE;21 }22}23public function reverseGeocode($lat, $lng) {24 $response = file_get_contents($url);25 if ($json['status'] == 'OK') {

Full Screen

Full Screen

ensureColumn

Using AI Code Generation

copy

Full Screen

1require_once 'Location.php';2$location = new Location();3$location->ensureColumn('column_name', 'column_type');4require_once 'Location.php';5$location = new Location();6$location->ensureColumn('column_name', 'column_type');7class Location {8 public function ensureColumn($columnName, $columnType) {9 }10}11class DbConnection {12 public function getConnection() {13 }14}15class DbConnection {16 public function getConnection() {17 }18}19class DbConnection {20 public function getConnection() {21 }22}23class DbConnection {24 public function getConnection() {25 }26}27class DbConnection {28 public function getConnection() {29 }30}31class DbConnection {

Full Screen

Full Screen

ensureColumn

Using AI Code Generation

copy

Full Screen

1require_once 'Location.php';2$location = new Location();3$location->ensureColumn("name", "varchar(255)", "NOT NULL", "''", "after id");4require_once 'Location.php';5$location = new Location();6$location->ensureColumn("name", "varchar(255)", "NOT NULL", "''", "after id");7$location->ensureColumn("name", "varchar(255)", "NOT NULL", "''", "after id");8require_once 'Location.php';9$location = new Location();10$location->ensureColumn("name", "varchar(255)", "NOT NULL", "''", "after id");11$location->ensureColumn("name", "varchar(255)", "NOT NULL", "''", "after id");12$location->ensureColumn("name", "varchar(255)", "NOT NULL", "''", "after id");13require_once 'Location.php';14$location = new Location();15$location->ensureColumn("name", "varchar(255)", "NOT NULL", "''", "after id");16$location->ensureColumn("name", "varchar(255)", "NOT NULL", "''", "after id");17$location->ensureColumn("name", "varchar(255)", "NOT NULL", "''", "after id");18$location->ensureColumn("name", "varchar(255)", "NOT NULL", "''", "after id");19require_once 'Location.php';20$location = new Location();21$location->ensureColumn("name", "varchar(255)", "NOT NULL", "''", "after id");22$location->ensureColumn("name", "varchar(255)", "NOT NULL", "''", "after id");23$location->ensureColumn("name", "varchar(255)", "NOT NULL", "''", "after id");24$location->ensureColumn("name", "varchar(255)", "NOT NULL", "''", "after id");25$location->ensureColumn("name", "varchar(255)", "NOT NULL", "''", "after id");

Full Screen

Full Screen

ensureColumn

Using AI Code Generation

copy

Full Screen

1$location = new Location();2$location->ensureColumn('column_name', 'column_type');3$location = new Location();4$location->addColumn('column_name', 'column_type');5$location = new Location();6$location->removeColumn('column_name');7$location = new Location();8$location->dropTable();9$location = new Location();10$location->renameColumn('old_column_name', 'new_column_name');11$location = new Location();12$location->renameTable('new_table_name');13$location = new Location();14$location->changeColumn('column_name', 'new_column_type');15$location = new Location();16$location->truncateTable();

Full Screen

Full Screen

ensureColumn

Using AI Code Generation

copy

Full Screen

1$column = new Location();2$column->ensureColumn('column_name');3$column = new Location();4$column->ensureColumn('column_name');5$column = new Location();6$column->ensureColumn('column_name');7$column = new Location();8$column->ensureColumn('column_name');9$column = new Location();10$column->ensureColumn('column_name');11$column = new Location();12$column->ensureColumn('column_name');13$column = new Location();14$column->ensureColumn('column_name');15$column = new Location();16$column->ensureColumn('column_name');17$column = new Location();18$column->ensureColumn('column_name');19$column = new Location();

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run Cucumber Common Library automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Most used method in Location

Trigger ensureColumn code on LambdaTest Cloud Grid

Execute automation tests with ensureColumn on a cloud-based Grid of 3000+ real browsers and operating systems for both web and mobile applications.

Test now for Free

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful