mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-22 07:52:29 +03:00
Added 'date_format' setting migration.
This commit is contained in:
parent
38187a208f
commit
d88362dcc0
5 changed files with 32 additions and 2 deletions
|
@ -24,6 +24,7 @@ INSERT INTO `ea_settings` (`id`, `name`, `value`) VALUES
|
|||
(5, 'company_link', 'http://www.abc-company.ea'),
|
||||
(6, 'google_analytics_code', '');
|
||||
(7, 'customer_notifications', '1');
|
||||
(8, 'date_format', 'DMY');
|
||||
|
||||
--
|
||||
-- Dumping data for table `ea_roles`
|
||||
|
|
|
@ -71,6 +71,10 @@ define('PRIV_USERS', 'users');
|
|||
define('PRIV_SYSTEM_SETTINGS', 'system_settings');
|
||||
define('PRIV_USER_SETTINGS', 'user_settings');
|
||||
|
||||
define('DATE_FORMAT_DMY', 'DMY');
|
||||
define('DATE_FORMAT_MDY', 'MDY');
|
||||
define('DATE_FORMAT_YMD', 'YMD');
|
||||
|
||||
define('MIN_PASSWORD_LENGTH', 7);
|
||||
define('ANY_PROVIDER', 'any-provider');
|
||||
/* End of file constants.php */
|
||||
|
|
|
@ -21,7 +21,7 @@ $config['migration_enabled'] = TRUE;
|
|||
| be upgraded / downgraded to.
|
||||
|
|
||||
*/
|
||||
$config['migration_version'] = 3; // current
|
||||
$config['migration_version'] = 4; // current
|
||||
|
||||
|
||||
/*
|
||||
|
|
24
src/application/migrations/004_add_date_format_setting.php
Normal file
24
src/application/migrations/004_add_date_format_setting.php
Normal file
|
@ -0,0 +1,24 @@
|
|||
<?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 - 2015, Alex Tselegidis
|
||||
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link http://easyappointments.org
|
||||
* @since v1.0.0
|
||||
* ---------------------------------------------------------------------------- */
|
||||
|
||||
class Migration_Add_date_format_setting extends CI_Migration {
|
||||
public function up() {
|
||||
$this->load->model('settings_model');
|
||||
$this->settings_model->set_setting('date_format', DATE_FORMAT_DMY);
|
||||
}
|
||||
|
||||
public function down() {
|
||||
$this->load->model('settings_model');
|
||||
$this->settings_model->remove_setting('date_format');
|
||||
}
|
||||
}
|
|
@ -1,3 +1,4 @@
|
|||
INSERT INTO ea_settings (name, value) VALUES
|
||||
('google_analytics_code', ''),
|
||||
('customer_notifications', '1');
|
||||
('customer_notifications', '1'),
|
||||
('date_format', 'DMY');
|
||||
|
|
Loading…
Reference in a new issue