-- phpMyAdmin SQL Dump
-- version 3.5.2.2
-- http://www.phpmyadmin.net
--
-- Host: mysql170.cs
-- Generation Time: Apr 25, 2013 at 02:16 PM
-- Server version: 5.1.61-0ubuntu0.10.10.1
-- PHP Version: 5.3.3-1ubuntu9.10

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

drop table if exists `applicant`;
drop table if exists `applicant_ads`;
drop table if exists `application_status`;
drop table if exists `apply`;
drop table if exists `interest`;
drop table if exists `job`;
drop table if exists `menu`;
drop table if exists `person`;
drop table if exists `privilege`;
drop table if exists `recommendation`;
drop table if exists `ref_info`;
drop table if exists `review`;

--
-- Database: `app_saca`
--

-- --------------------------------------------------------

--
-- Table structure for table `applicant`
--


CREATE TABLE IF NOT EXISTS `applicant` (
  `applicantid` int(10) NOT NULL AUTO_INCREMENT,
  `privilege_id` int(10) NOT NULL DEFAULT '4',
  `title` varchar(10) NOT NULL DEFAULT '',
  `firstname` varchar(250) NOT NULL DEFAULT '',
  `lastname` varchar(250) NOT NULL DEFAULT '',
  `gender` varchar(10) NOT NULL DEFAULT '',
  `email` varchar(250) NOT NULL DEFAULT '',
  `username` varchar(250) NOT NULL DEFAULT '',
  `password` varchar(250) NOT NULL DEFAULT '',
  `mother_name` varchar(250) NOT NULL DEFAULT '',
  `home_address` text NOT NULL,
  `phone` varchar(30) NOT NULL DEFAULT '',
  `fax` varchar(30) NOT NULL DEFAULT '',
  `eligible_to_work` varchar(250) NOT NULL DEFAULT '',
  `year_of_phd` varchar(20) NOT NULL DEFAULT '',
  `employer` varchar(250) NOT NULL DEFAULT '',
  `department` varchar(250) NOT NULL DEFAULT '',
  `current_title` varchar(250) NOT NULL DEFAULT '',
  `work_address` text NOT NULL,
  PRIMARY KEY (`applicantid`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1667 ;

-- --------------------------------------------------------

--
-- Table structure for table `applicant_ads`
--


CREATE TABLE IF NOT EXISTS `applicant_ads` (
  `applicantid` int(10) NOT NULL,
  `adname` text NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `application_status`
--


CREATE TABLE IF NOT EXISTS `application_status` (
  `application_status_id` int(10) NOT NULL AUTO_INCREMENT,
  `description` varchar(255) NOT NULL DEFAULT '',
  `applicant_visible` tinyint(1) NOT NULL DEFAULT '0',
  `saca_visible` tinyint(1) NOT NULL DEFAULT '0',
  `faculty_visible` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`application_status_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=15 ;

-- --------------------------------------------------------

--
-- Table structure for table `apply`
--


CREATE TABLE IF NOT EXISTS `apply` (
  `applyid` int(10) NOT NULL AUTO_INCREMENT,
  `applicantid` int(10) NOT NULL DEFAULT '0',
  `jobid` int(10) NOT NULL DEFAULT '0',
  `archive` varchar(10) DEFAULT NULL,
  `rejected` varchar(10) DEFAULT NULL,
  `frozen` varchar(10) DEFAULT NULL,
  `date_applied` date NOT NULL DEFAULT '0000-00-00',
  `application_status_id` int(10) NOT NULL DEFAULT '0',
  `other_comments` text,
  PRIMARY KEY (`applyid`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1527 ;

-- --------------------------------------------------------

--
-- Table structure for table `interest`
--


CREATE TABLE IF NOT EXISTS `interest` (
  `applicantid` int(10) NOT NULL DEFAULT '0',
  `rank_sought` varchar(250) NOT NULL DEFAULT '',
  `research_interest` varchar(250) NOT NULL DEFAULT '',
  `course_taken` varchar(250) NOT NULL DEFAULT '',
  PRIMARY KEY (`applicantid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `job`
--


CREATE TABLE IF NOT EXISTS `job` (
  `jobid` int(10) NOT NULL AUTO_INCREMENT,
  `job_type` varchar(250) NOT NULL DEFAULT '',
  `job_description` text NOT NULL,
  `archive` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`jobid`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=26 ;

-- --------------------------------------------------------

--
-- Table structure for table `menu`
--


CREATE TABLE IF NOT EXISTS `menu` (
  `menu_id` int(10) NOT NULL AUTO_INCREMENT,
  `description` text NOT NULL,
  `url` text NOT NULL,
  `child_of` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`menu_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=27 ;

-- --------------------------------------------------------

--
-- Table structure for table `person`
--


CREATE TABLE IF NOT EXISTS `person` (
  `personid` int(10) NOT NULL AUTO_INCREMENT,
  `privilege_id` varchar(20) NOT NULL DEFAULT '',
  `nexus` varchar(8) NOT NULL DEFAULT '',
  `firstname` varchar(250) NOT NULL DEFAULT '',
  `lastname` varchar(250) NOT NULL DEFAULT '',
  PRIMARY KEY (`personid`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=112 ;

-- --------------------------------------------------------

--
-- Table structure for table `privilege`
--


CREATE TABLE IF NOT EXISTS `privilege` (
  `privilege_id` int(10) NOT NULL AUTO_INCREMENT,
  `description` varchar(255) NOT NULL DEFAULT '',
  `menu` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`privilege_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ;

-- --------------------------------------------------------

--
-- Table structure for table `recommendation`
--


CREATE TABLE IF NOT EXISTS `recommendation` (
  `recommendation_id` int(10) NOT NULL DEFAULT '0',
  `description` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`recommendation_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `ref_info`
--


CREATE TABLE IF NOT EXISTS `ref_info` (
  `url` varchar(150) NOT NULL,
  `app_name` varchar(150) NOT NULL,
  `ref_email` varchar(150) NOT NULL,
  `year` int(11) NOT NULL,
  `question` varchar(500) NOT NULL,
  `answer` varchar(500) NOT NULL,
  `uploaded` tinyint(4) NOT NULL,
  `app_username` varchar(250) NOT NULL,
  `declined` tinyint(4) NOT NULL,
  `app_email` varchar(150) NOT NULL,
  PRIMARY KEY (`url`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `review`
--


CREATE TABLE IF NOT EXISTS `review` (
  `reviewid` int(10) NOT NULL AUTO_INCREMENT,
  `applyid` int(10) NOT NULL DEFAULT '0',
  `personid` int(10) NOT NULL DEFAULT '0',
  `research` text,
  `teaching` text,
  `more` text,
  `other` text,
  `recommendation_id` int(10) DEFAULT NULL,
  `rating` double NOT NULL DEFAULT '0',
  `review_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `chair_notes` text,
  PRIMARY KEY (`reviewid`),
  KEY `applyid` (`applyid`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=504 ;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
