From d51d5fb2e397afd2fcdc07c41ab4bb4d79db791a Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Fri, 8 Sep 2017 15:21:47 -0400 Subject: [PATCH] adding more db changes fixing some of the db fields and setting up the post expiration array in the config ini. --- classes/data/dataJobs.php | 5 ++++- config/plugin.ini | 4 ++++ setup/databaseScripts/create_database_V0.0.1.sql | 12 ++++++------ setup/databaseScripts/dbVersions.php | 2 +- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/classes/data/dataJobs.php b/classes/data/dataJobs.php index 8f9ce9a..62efcea 100644 --- a/classes/data/dataJobs.php +++ b/classes/data/dataJobs.php @@ -200,7 +200,10 @@ class GlmDatajobs extends GlmDataAbstract ), 'job_expiration' => array ( 'field' => 'job_expiration', - 'type' => 'text', + 'type' => 'list', + 'list' => $this->config['job_expiration'], + 'default' => '30 Days', + 'force_list' => true, 'use' => 'a' ), 'duration' => array ( diff --git a/config/plugin.ini b/config/plugin.ini index 9222f7e..52970d4 100644 --- a/config/plugin.ini +++ b/config/plugin.ini @@ -6,3 +6,7 @@ ; [common] +; Entry Status Types +; +job_expiration[30] = '30 Days' +job_expiration[60] = '60 days' \ No newline at end of file diff --git a/setup/databaseScripts/create_database_V0.0.1.sql b/setup/databaseScripts/create_database_V0.0.1.sql index 31fe7ed..e8a032c 100644 --- a/setup/databaseScripts/create_database_V0.0.1.sql +++ b/setup/databaseScripts/create_database_V0.0.1.sql @@ -14,24 +14,24 @@ -- Conditions Table CREATE TABLE {prefix}jobs ( id INT NOT NULL AUTO_INCREMENT, - title TINYINT NULL DEFAULT '', + title TINYTEXT NULL DEFAULT '', descr TEXT NULL DEFAULT '', salary TINYTEXT NULL DEFAULT '', location TINYTEXT NULL DEFAULT '', contactname TINYTEXT NULL DEFAULT '', contactphone TINYTEXT NULL DEFAULT '', - post_date DATETIME NULL DEFAULT '', - visible BOOL NULL DEFAULT '', + post_date DATETIME NULL DEFAULT NOW(), + visible BOOL NULL, facility_operation TEXT NULL DEFAULT '', requirements TEXT NULL DEFAULT '', benefits TEXT NULL DEFAULT '', - joblocation TINYTEXT NULL DEFAULT '', - post TINYTEXT NULL DEFAULT '30 days', + job_location TINYTEXT NULL DEFAULT '', + job_expiration TINYTEXT NULL, duration TINYTEXT NULL DEFAULT '', deadline TINYTEXT NULL DEFAULT '', course_operation TINYTEXT NULL DEFAULT '', position_available TINYTEXT NULL DEFAULT '', - member INT NULL DEFAULT '', + member INT NULL, PRIMARY KEY (id) ); diff --git a/setup/databaseScripts/dbVersions.php b/setup/databaseScripts/dbVersions.php index 2fbb0bf..bd688f0 100644 --- a/setup/databaseScripts/dbVersions.php +++ b/setup/databaseScripts/dbVersions.php @@ -34,5 +34,5 @@ $glmMembersjobsDbVersions = array( - '0.0.1' => array('version' => '0.0.1', 'tables' => 1, 'date' => '09/08/2017'), + '0.0.1' => array('version' => '0.0.1', 'tables' => 2, 'date' => '09/08/2017'), ); -- 2.17.1