adding old_id columns for data import
authorAnthony Talarico <talarico@gaslightmedia.com>
Thu, 21 Sep 2017 14:56:02 +0000 (10:56 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Thu, 21 Sep 2017 14:56:02 +0000 (10:56 -0400)
adding a new colum for old_ids to accommodate the import

classes/data/dataJobTitles.php
classes/data/dataJobs.php
setup/databaseScripts/create_database_V0.0.1.sql
views/admin/jobs/index.html

index a1fc9e6..872063e 100644 (file)
@@ -133,6 +133,12 @@ class GlmDataJobTitles extends GlmDataAbstract
             'id' => array (
                 'field' => 'id',
                 'type' => 'integer',
+                'view_only' => true,
+                'use' => 'a'
+            ),
+            'old_id' => array (
+                'field' => 'old_id',
+                'type' => 'integer',
                 'use' => 'a'
             ),
             'job_title' => array (
index 1ea8dab..bdd4b5d 100644 (file)
@@ -136,6 +136,11 @@ class GlmDataJobs extends GlmDataAbstract
                 'view_only' => true,
                 'use' => 'a'
             ),
+            'old_id' => array (
+                'field' => 'old_id',
+                'type' => 'integer',
+                'use' => 'a'
+            ),
             'title' => array (
                 'field' => 'title',
                 'type' => 'pointer',
@@ -179,6 +184,11 @@ class GlmDataJobs extends GlmDataAbstract
                 'type' => 'datetime',
                 'use' => 'lge'
             ),
+            'updated' => array (
+                'field' => 'updated',
+                'type' => 'datetime',
+                'use' => 'a'
+            ),
             'visible' => array (
                 'field' => 'visible',
                 'type' => 'checkbox',
@@ -232,6 +242,7 @@ class GlmDataJobs extends GlmDataAbstract
                 'type' => 'text',
                 'use' => 'a'
             ),
+
             'member' => array (
                 'field' => 'member',
                 'type' => 'pointer',
index a47e149..cb4d254 100644 (file)
@@ -14,6 +14,7 @@
 -- Conditions Table
 CREATE TABLE {prefix}jobs (
     id INT NOT NULL AUTO_INCREMENT,
+    old_id int NULL ,
     title int NULL ,
     descr TEXT NULL ,
     salary TINYTEXT NULL ,
@@ -22,6 +23,7 @@ CREATE TABLE {prefix}jobs (
     contactname TINYTEXT NULL ,
     contactphone TINYTEXT NULL ,
     post_date DATETIME NULL DEFAULT NOW(),
+    updated DATETIME NULL DEFAULT NOW(),
     visible BOOL NULL,
     facility_operation TEXT NULL,
     requirements TEXT NULL,
@@ -41,6 +43,7 @@ CREATE TABLE {prefix}jobs (
 -- Job Titles
 CREATE TABLE {prefix}job_titles (
   id INT NOT NULL AUTO_INCREMENT,
+  old_id INT NULL,
   job_title TINYTEXT NULL ,
   PRIMARY KEY (id)
 );
@@ -48,17 +51,17 @@ CREATE TABLE {prefix}job_titles (
 ----
 
 -- Job Titles default entries in table
-INSERT INTO {prefix}job_titles ( id,job_title) VALUES
-(1, 'Supervisor'),(2,'Groundskeeper'),(3,'Janitor');
+INSERT INTO {prefix}job_titles ( id,old_id,job_title) VALUES
+(1,1, 'Supervisor'),(2,1,'Groundskeeper'),(3,1,'Janitor');
 
 ----
 
 -- Job Titles default entries in table
 INSERT INTO {prefix}jobs ( 
-id,title,descr,salary, email_location,resume_location,contactname,contactphone,post_date,visible, 
+id,old_id,title,descr,salary, email_location,resume_location,contactname,contactphone,post_date,updated,visible, 
 facility_operation,requirements,job_location,job_expiration,duration,deadline,position_available,
 company,member,benefits
-) VALUES ( 1, 1,"DESCRIPTION",'SALARY', 'EMAIL LOCATION', 'RESUME LOCATION','CONTACT NAME', '453-3443', NOW(), true,
+) VALUES ( 1,1, 1,"DESCRIPTION",'SALARY', 'EMAIL LOCATION', 'RESUME LOCATION','CONTACT NAME', '453-3443', NOW(),NOW(), true,
 'facility operations', 'REQUIREMENTS', 'JOB LOCATION', 30, 'JOB DURATION', 'DEADLINE', 'POSITION AVAILABLE',
 'COMPANY', 1, 'JOB BENEFITS'
 );
\ No newline at end of file
index 280e007..7dbf365 100644 (file)
@@ -22,7 +22,7 @@
                     <div class="glm-row admin-job-data">
                         <div class="job-title-list glm-small-12 glm-medium-4 glm-large-3 glm-columns no-padding">{$data.title}</div>
                         <div class="job-company-list glm-small-12 glm-medium-4 glm-large-3 glm-columns no-padding">{$data.company}</div>
-                        <div class="job-member-list glm-small-12 glm-medium-4 glm-large-3 glm-columns no-padding">MEMBER NAME</div>
+                        <div class="job-member-list glm-small-12 glm-medium-4 glm-large-3 glm-columns no-padding">{$data.member}</div>
                         <div class="job-date-list glm-small-12 glm-medium-4 glm-large-3 glm-columns no-padding">{$data.post_date.timestamp|date_format:"%Y-%m-%d"}</div>
                     </div>
                 </div>