iflrandevu/application/migrations/022_add_show_fields_setting...

58 lines
1.7 KiB
PHP
Raw Normal View History

2021-05-28 14:37:58 +03:00
<?php defined('BASEPATH') or exit('No direct script access allowed');
/* ----------------------------------------------------------------------------
* Easy!Appointments - Open Source Web Scheduler
*
* @package EasyAppointments
2021-10-29 11:19:10 +03:00
* @author A.Tselegidis <alextselegidis@gmail.com>
2021-05-28 14:37:58 +03:00
* @copyright Copyright (c) 2013 - 2020, Alex Tselegidis
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
* @link http://easyappointments.org
2021-10-29 11:19:10 +03:00
* @since v1.5.0
2021-05-28 14:37:58 +03:00
* ---------------------------------------------------------------------------- */
2021-10-29 11:19:10 +03:00
class Migration_Add_show_fields_setting extends EA_Migration {
2021-05-28 14:37:58 +03:00
/**
* Upgrade method.
*/
public function up()
{
$this->db->insert('settings', [
'name' => 'show_phone_number',
'value' => '1'
]);
$this->db->insert('settings', [
'name' => 'show_address',
'value' => '1'
]);
$this->db->insert('settings', [
'name' => 'show_city',
'value' => '1'
]);
$this->db->insert('settings', [
'name' => 'show_zip_code',
'value' => '1'
]);
$this->db->insert('settings', [
'name' => 'show_notes',
'value' => '1'
]);
}
/**
* Downgrade method.
*/
public function down()
{
$this->db->delete('settings', ['name' => 'show_phone_number']);
$this->db->delete('settings', ['name' => 'show_address']);
$this->db->delete('settings', ['name' => 'show_city']);
$this->db->delete('settings', ['name' => 'show_zip_code']);
$this->db->delete('settings', ['name' => 'show_notes']);
}
}