Added time format setting in the database and created migration file.

This commit is contained in:
alext 2018-03-06 22:46:33 +01:00
parent d971f4f097
commit 7c620c6734
3 changed files with 30 additions and 2 deletions

View File

@ -37,7 +37,7 @@ $config['migration_table'] = 'ea_migrations';
| be upgraded / downgraded to.
|
*/
$config['migration_version'] = 9; // current
$config['migration_version'] = 10; // current
/*

View File

@ -0,0 +1,27 @@
<?php defined('BASEPATH') OR exit('No direct script access allowed');
/* ----------------------------------------------------------------------------
* Easy!Appointments - Open Source Web Scheduler
*
* @package EasyAppointments
* @author A.Tselegidis <alextselegidis@gmail.com>
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
* @link http://easyappointments.org
* @since v1.3.0
* ---------------------------------------------------------------------------- */
class Migration_Add_time_format_setting extends CI_Migration {
public function up()
{
$this->db->insert('ea_settings', [
'name' => 'time_format',
'value' => 'regular'
]);
}
public function down()
{
$this->db->delete('ea_settings', ['name' => 'time_format']);
}
}

View File

@ -15,6 +15,7 @@ VALUES
('google_analytics_code', ''),
('customer_notifications', '1'),
('date_format', 'DMY'),
('time_format', 'regular'),
('require_captcha', '0');
INSERT INTO `ea_migrations` VALUES ('9');
INSERT INTO `ea_migrations` VALUES ('10');