adding more db changes
authorAnthony Talarico <talarico@gaslightmedia.com>
Fri, 8 Sep 2017 19:21:47 +0000 (15:21 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Fri, 8 Sep 2017 19:21:47 +0000 (15:21 -0400)
fixing some of the db fields and setting up the post expiration array in the config
ini.

classes/data/dataJobs.php
config/plugin.ini
setup/databaseScripts/create_database_V0.0.1.sql
setup/databaseScripts/dbVersions.php

index 8f9ce9a..62efcea 100644 (file)
@@ -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 (
index 9222f7e..52970d4 100644 (file)
@@ -6,3 +6,7 @@
 ;
 
 [common]
+; Entry Status Types
+;
+job_expiration[30] = '30 Days'
+job_expiration[60] = '60 days'
\ No newline at end of file
index 31fe7ed..e8a032c 100644 (file)
 -- 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)
 );
 
index 2fbb0bf..bd688f0 100644 (file)
@@ -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'),
 );