easyappointments/application/migrations/022_add_show_field_settings.php

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-12-18 19:43:45 +03:00
* @copyright Copyright (c) Alex Tselegidis
* @license https://opensource.org/licenses/GPL-3.0 - GPLv3
* @link https://easyappointments.org
2021-10-29 11:19:10 +03:00
* @since v1.5.0
2021-05-28 14:37:58 +03:00
* ---------------------------------------------------------------------------- */
2021-11-22 10:03:19 +03:00
class Migration_Add_show_field_settings 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']);
}
}