Updated installation scripts with new db columns.

This commit is contained in:
Alex Tselegidis 2016-07-24 10:48:57 +02:00
parent 1f0c10f70a
commit c4f5a26a55
3 changed files with 8 additions and 1 deletions

View file

@ -84,6 +84,7 @@ class Installation extends CI_Controller {
$admin = json_decode($_POST['admin'], true); $admin = json_decode($_POST['admin'], true);
$admin['settings']['username'] = $admin['username']; $admin['settings']['username'] = $admin['username'];
$admin['settings']['password'] = $admin['password']; $admin['settings']['password'] = $admin['password'];
$admin['settings']['calendar_view'] = CALENDAR_VIEW_DEFAULT;
unset($admin['username'], $admin['password']); unset($admin['username'], $admin['password']);
$admin['id'] = $this->admins_model->add($admin); $admin['id'] = $this->admins_model->add($admin);

View file

@ -40,6 +40,8 @@ function get_sample_service() {
'price' => 50.0, 'price' => 50.0,
'currency' => 'Euro', 'currency' => 'Euro',
'description' => 'This is a test service automatically inserted by the installer.', 'description' => 'This is a test service automatically inserted by the installer.',
'availabilities_type' => 'flexible',
'attendants_number' => 1,
'id_service_categories' => NULL 'id_service_categories' => NULL
); );
} }
@ -64,7 +66,8 @@ function get_sample_provider() {
'notifications' => FALSE, 'notifications' => FALSE,
'google_sync' => FALSE, 'google_sync' => FALSE,
'sync_past_days' => 5, 'sync_past_days' => 5,
'sync_future_days' => 5 'sync_future_days' => 5,
'calendar_view' => CALENDAR_VIEW_DEFAULT
) )
); );
} }

View file

@ -51,6 +51,8 @@ CREATE TABLE IF NOT EXISTS `ea_services` (
`price` decimal(10,2) DEFAULT NULL, `price` decimal(10,2) DEFAULT NULL,
`currency` varchar(32) DEFAULT NULL, `currency` varchar(32) DEFAULT NULL,
`description` text, `description` text,
`availabilities_type` varchar(32) DEFAULT 'flexible',
`attendants_number` int(11) DEFAULT '1',
`id_service_categories` bigint(20) unsigned DEFAULT NULL, `id_service_categories` bigint(20) unsigned DEFAULT NULL,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
KEY `id_service_categories` (`id_service_categories`) KEY `id_service_categories` (`id_service_categories`)
@ -111,6 +113,7 @@ CREATE TABLE IF NOT EXISTS `ea_user_settings` (
`google_calendar` varchar(128) DEFAULT NULL, `google_calendar` varchar(128) DEFAULT NULL,
`sync_past_days` int(11) DEFAULT '5', `sync_past_days` int(11) DEFAULT '5',
`sync_future_days` int(11) DEFAULT '5', `sync_future_days` int(11) DEFAULT '5',
`calendar_view` varchar(32) DEFAULT 'default',
PRIMARY KEY (`id_users`) PRIMARY KEY (`id_users`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;