added tc_scheduling_priority table, removed pri and notes fields from tc_individual...
[eq/.git] / sql / tc.sql
index 79cd0a077c395477c8dcb34c540e6115bb5f36b1..71902b6063642629e0f9897c0bcef9871aa04383 100644 (file)
@@ -44,7 +44,7 @@ CREATE TABLE `tc_appointment` (
 CREATE TABLE `tc_assignment` (
   `assignment` int(12) unsigned NOT NULL auto_increment,
   `name` varchar(60) NOT NULL,
-  `code` varchar(12) default NULL,
+  `abbreviation` varchar(12) default NULL,
   PRIMARY KEY  (`assignment`)
 ) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;
 
@@ -53,7 +53,7 @@ CREATE TABLE `tc_assignment` (
 --
 LOCK TABLES `tc_assignment` WRITE;
 /*!40000 ALTER TABLE `tc_assignment` DISABLE KEYS */;
-INSERT INTO `tc_assignment` (`assignment`, `name`, `code`) VALUES (1,'Enrichment Night Babysitting','RS'),(2,'Building Lockup','LU'),(3,'Building Cleaning Coordinator','CC'),(4,'Missionary Splits','MS'),(5,'Stake Farm','SF'),(6,'Loveland Kitchen','LK'),(7,'Moves','MV'),(8,'Temple Kitchen & Laundary','TKL'),(9,'Temple Sealings','TS'),(10,'Temple Initatories','TI');
+INSERT INTO `tc_assignment` (`assignment`, `name`, `abbreviation`) VALUES (1,'Enrichment Night Babysitting','RS'),(2,'Building Lockup','LU'),(3,'Building Cleaning Coordinator','CC'),(4,'Missionary Splits','MS'),(5,'Stake Farm','SF'),(6,'Loveland Kitchen','LK'),(7,'Moves','MV'),(8,'Temple Kitchen & Laundary','TKL'),(9,'Temple Sealings','TS'),(10,'Temple Initatories','TI');
 /*!40000 ALTER TABLE `tc_assignment` ENABLE KEYS */;
 UNLOCK TABLES;
 
@@ -87,6 +87,7 @@ CREATE TABLE `tc_companionship` (
   `companionship` int(16) unsigned NOT NULL default '0',
   `individual` int(16) unsigned NOT NULL default '0',
   `district` int(16) unsigned default NULL,
+  `scheduling_priority` int(16) unsigned default NULL,
   `valid` tinyint(1) default NULL,
   KEY `companionship` (`companionship`)
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
@@ -116,10 +117,7 @@ CREATE TABLE `tc_individual` (
   `hh_position` enum('Head of Household','Spouse','Other') DEFAULT 'Other',
   `priesthood` enum('High Priest','Elder','Priest','Teacher','Deacon','Unordained') DEFAULT NULL,
   `steward` enum('High Priest','Elder') DEFAULT NULL,
-  `ppi_pri` int(10) unsigned NOT NULL default '1',
-  `ppi_notes` varchar(128) default NULL,
-  `hti_pri` int(10) unsigned default '1',
-  `hti_notes` varchar(128) default NULL,
+  `scheduling_priority` int(16) unsigned default NULL,
   `attending` tinyint(1) default '0',
   `valid` tinyint(1) default NULL,
   PRIMARY KEY  (`individual`)
@@ -135,8 +133,7 @@ CREATE TABLE `tc_family` (
   `name_id` varchar(30) NOT NULL default '',
   `individual` int(16) unsigned default '0',
   `companionship` int(16) unsigned default NULL,
-  `visit_pri` int(10) unsigned default '1',
-  `visit_notes` varchar(128) default NULL,
+  `scheduling_priority` int(16) unsigned default NULL,
   `valid` tinyint(1) default NULL,
   PRIMARY KEY  (`family`)
 ) ENGINE=MyISAM AUTO_INCREMENT=277 DEFAULT CHARSET=latin1;
@@ -206,3 +203,12 @@ CREATE TABLE `tc_willingness` (
   `willing` enum('y','n','') NOT NULL,
   KEY `individual` (`individual`,`assignment`)
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+
+--
+-- Table structure for table `tc_scheduling_priority`
+--
+CREATE TABLE `phpgroupware`.`tc_scheduling_priority` (
+`scheduling_priority` INT( 16 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
+`priority` INT( 10 ) UNSIGNED NOT NULL DEFAULT '30',
+`notes` VARCHAR( 128 ) NOT NULL DEFAULT ''
+) ENGINE = MYISAM ;