-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupdate.php
34 lines (29 loc) · 1.2 KB
/
update.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
$t_contact_info = 'naju_contact_info';
if (rex_version::compare($this->getVersion(), '0.0.2', '<')) {
// Update to 0.0.2 from something older
rex_sql_table::get($t_contact_info)
->ensureColumn(new rex_sql_column('instagram', 'varchar(120)', false, ''))
->ensureColumn(new rex_sql_column('facebook', 'varchar(120)', false, ''))
->alter();
}
if (rex_version::compare($this->getVersion(), '0.0.3', '<')) {
// Update to 0.0.3 from something older
rex_sql_table::get($t_contact_info)
->ensureColumn(new rex_sql_column('business_hours', 'varchar(255)', $default = ''))
->alter();
}
if (rex_version::compare($this->getVersion(), '0.0.4', '<')) {
// Update to 0.0.4 from something older
rex_sql_table::get($t_contact_info)
->ensureColumn(new rex_sql_column('whatsapp', 'varchar(120)', false, ''))
->ensureColumn(new rex_sql_column('telegram', 'varchar(120)', false, ''))
->alter();
}
if (rex_version::compare($this->getVersion(), '0.0.5', '<')) {
// Update to 0.0.5 from something older
rex_sql_table::get($t_contact_info)
->ensureColumn(new rex_sql_column('seo_title_prefix', 'varchar(191)', false, ''))
->ensureColumn(new rex_sql_column('seo_description', 'text', false, ''))
->alter();
}