-- phpMyAdmin SQL Dump
-- version 2.10.1
-- http://www.phpmyadmin.net
-- 
-- Host: localhost
-- Generation Time: Feb 20, 2008 at 08:53 AM
-- Server version: 5.0.41
-- PHP Version: 5.2.3

-- 
-- Database: `carbon`
-- 

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

-- 
-- Table structure for table `c12_actionitems`
-- 

DROP TABLE IF EXISTS `c12_actionitems`;
CREATE TABLE IF NOT EXISTS `c12_actionitems` (
  `actionID` int(11) unsigned NOT NULL auto_increment,
  `actiondescription` text,
  `actionamount` float unsigned default NULL,
  `actionname` varchar(50) default NULL,
  `actionreference` varchar(255) default NULL,
  `actionitemstypesID` int(11) default NULL,
  PRIMARY KEY  (`actionID`),
  UNIQUE KEY `actionID` (`actionID`),
  KEY `actionID_2` (`actionID`)
) TYPE=MyISAM  COMMENT='Actions performed by users' AUTO_INCREMENT=121 ;

-- 
-- Dumping data for table `c12_actionitems`
-- 

INSERT INTO `c12_actionitems` (`actionID`, `actiondescription`, `actionamount`, `actionname`, `actionreference`, `actionitemstypesID`) VALUES 
(1, 'Replace a commonly-used 100-watt incandescent light bulb with an equivalent CFL bulb (~26 watts). Commonly-used refers to a bulb operated for roughly 4 hours or more per day.', 100, 'Replace a 100 watt incandesent bulb', 'Low Carbon Diet, by David Gerson', NULL),
(6, 'Stop using a 100 Watt incandescent bulb altogether (not just replacing it with an equivalent CFL) saves 200 lbs per year, assuming you used to operate the lamp for four hours per day.', 200, 'Shut off a 100-watt bulb', 'http://selene-ny.org/lightcost/', NULL),
(7, 'Replace a dusk-to-dawn mercury-vapor "security light" with a motion-sensor controlled PAR floodlight.', 1000, 'Replace dusk-to-dawn light with motion sensor', 'http://selene-ny.org/lightcost/', NULL),
(8, 'Reduce your weekly trash container size from a 90-gallon to 60-gallon volume and save 1.5 tons per year.', 3120, 'Reduce weekly waste', NULL, NULL),
(9, 'Reduce your weekly trash container size from a 60-gallon to 35-gallon volume and save over a ton per year', 2600, 'Reduce weekly waste', NULL, NULL),
(10, 'Reduce your weekly trash container size from a 35-gallon to 20-gallon volume and save 3/4 tons per year', 1560, 'Reduce weekly waste', NULL, NULL),
(11, 'Reduce your average shower time from 10 to 5 minutes.', 300, 'Take 5-minute showers', NULL, NULL),
(12, 'Replace a standard shower head with a low-flow model.', 250, 'Replace shower head', NULL, NULL),
(13, 'Run the dishwasher one load less per week without increasing hand dishwashing.', 100, 'Eliminate a dishwasher load', NULL, NULL),
(14, 'Switch one load of laundry each week from hot to cold water.', 100, 'Wash in cold water', NULL, NULL),
(15, 'Eliminate one dryer load per week (hang dry instead).', 260, 'Eliminate a clothesdryer load', NULL, NULL),
(16, 'Turn off all your appliances by unplugging or with plug-strips to eliminate vampires (those power taps) and phantom loads (power used when the appliance is shut off).', 600, 'Banish the phantoms', NULL, NULL),
(17, 'Eliminate one mile of driving by walking, sharing rides, or planning and combining trips.', 1, 'Walk instead of drive', NULL, NULL),
(18, 'Add an insulating blanket to your hot water heater.', 175, 'Add a water heater blanket', NULL, NULL);


-- --------------------------------------------------------
-- 
-- Table structure for table `c12_actionitemstypes`
-- 

DROP TABLE IF EXISTS `c12_actionitemstypes`;
CREATE TABLE IF NOT EXISTS `c12_actionitemstypes` (
  `actionitemstypeID` int(11) unsigned NOT NULL auto_increment,
  `actionitemstype` varchar(50) default NULL,
  PRIMARY KEY  (`actionitemstypeID`),
  UNIQUE KEY `actionitemstypesID` (`actionitemstypeID`),
  KEY `actionitemstypesID_2` (`actionitemstypeID`)
) TYPE=MyISAM  AUTO_INCREMENT=5 ;

-- 
-- Dumping data for table `c12_actionitemstypes`
-- 

INSERT INTO `c12_actionitemstypes` (`actionitemstypeID`, `actionitemstype`) VALUES 
(1, 'Home'),
(2, 'Car and travel'),
(3, 'Outdoors'),
(4, 'Business');

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

-- 
-- Table structure for table `c12_actions`
-- 

DROP TABLE IF EXISTS `c12_actions`;
CREATE TABLE IF NOT EXISTS `c12_actions` (
  `userid` int(11) unsigned default NULL,
  `teamID` int(11) unsigned default NULL,
  `goalID` int(11) unsigned default NULL,
  `actionID` int(11) unsigned default NULL,
  `qty` float unsigned default NULL,
  `actiondate` varchar(50) default NULL
) TYPE=MyISAM COMMENT='Actions performed by users';

-- 
-- Dumping data for table `c12_actions`
-- 

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

-- 
-- Table structure for table `c12_messages`
-- 

DROP TABLE IF EXISTS `c12_messages`;
CREATE TABLE IF NOT EXISTS `c12_messages` (
  `msgID` int(11) unsigned NOT NULL auto_increment,
  `teamID` int(11) unsigned default NULL,
  `msgDate` varchar(50) default NULL,
  `message` text,
  `forleaders` tinyint(1) unsigned default '0',
  PRIMARY KEY  (`msgID`),
  UNIQUE KEY `msgID` (`msgID`)
) TYPE=MyISAM  COMMENT='Admin and team leader messages' AUTO_INCREMENT=1 ;

-- 
-- Dumping data for table `c12_messages`
-- 

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

-- 
-- Table structure for table `c12_modules`
-- 

DROP TABLE IF EXISTS `c12_modules`;
CREATE TABLE IF NOT EXISTS `c12_modules` (
  `moduleid` int(11) unsigned NOT NULL auto_increment,
  `tabname` varchar(15) default NULL,
  `tabfile` varchar(100) default NULL,
  `tabtype` tinyint(2) unsigned default '3',
  `sortOrder` int(11) unsigned default '999',
  PRIMARY KEY  (`moduleid`),
  UNIQUE KEY `moduleid` (`moduleid`),
  KEY `moduleid_2` (`moduleid`)
) TYPE=MyISAM COMMENT='Add-on module information' AUTO_INCREMENT=1 ;

-- 
-- Dumping data for table `c12_modules`
-- 


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

-- 
-- Table structure for table `c12_people`
-- 

DROP TABLE IF EXISTS `c12_people`;
CREATE TABLE IF NOT EXISTS `c12_people` (
  `userid` int(11) unsigned NOT NULL auto_increment,
  `email` varchar(100) default NULL,
  `nickname` varchar(25) default NULL,
  `password` varchar(100) default NULL,
  `avatar` varchar(50) default NULL,
  `roleid` tinyint(3) unsigned default '3',
  `registerDate` varchar(50) default NULL,
  `teamID` int(11) unsigned default NULL,
  `lastlogin` varchar(50) default NULL,
  `inviteID` varchar(20) default NULL,
  PRIMARY KEY  (`userid`),
  UNIQUE KEY `userid` (`userid`)
) TYPE=MyISAM  COMMENT='User table' AUTO_INCREMENT=2 ;

-- 
-- Dumping data for table `c12_people`
-- 

INSERT INTO `c12_people` (`userid`, `email`, `nickname`, `password`, `avatar`, `roleid`, `registerDate`, `teamID`, `lastlogin`, `inviteID`) VALUES 
(1, 'admin@example.com', 'changeme', '482c811da5d5b4bc6d497ffa98491e38', NULL, 1, '1200499258', 1, NULL, NULL);

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

-- 
-- Table structure for table `c12_roles`
-- 

DROP TABLE IF EXISTS `c12_roles`;
CREATE TABLE IF NOT EXISTS `c12_roles` (
  `roleid` tinyint(3) unsigned NOT NULL auto_increment,
  `role` varchar(15) default NULL,
  PRIMARY KEY  (`roleid`),
  UNIQUE KEY `roleid` (`roleid`)
) TYPE=MyISAM  COMMENT='Security roles, must match values in core.php' AUTO_INCREMENT=5 ;

-- 
-- Dumping data for table `c12_roles`
-- 

INSERT INTO `c12_roles` (`roleid`, `role`) VALUES 
(4, 'Super Admin'),
(1, 'Administrator'),
(2, 'Moderator'),
(3, 'User');

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

-- 
-- Table structure for table `c12_sitegoals`
-- 

DROP TABLE IF EXISTS `c12_sitegoals`;
CREATE TABLE IF NOT EXISTS `c12_sitegoals` (
  `goaltypeID` int(10) unsigned NOT NULL auto_increment,
  `goalname` varchar(50) default NULL,
  `goaldescription` mediumtext,
  `goalamount` float default NULL,
  `goalunit` varchar(10) default NULL,
  PRIMARY KEY  (`goaltypeID`),
  UNIQUE KEY `goaltypeID` (`goaltypeID`),
  KEY `goaltypeID_2` (`goaltypeID`)
) TYPE=MyISAM  COMMENT='Site-wide goal, single value supported currently' AUTO_INCREMENT=2 ;

-- 
-- Dumping data for table `c12_sitegoals`
-- 

INSERT INTO `c12_sitegoals` (`goaltypeID`, `goalname`, `goaldescription`, `goalamount`, `goalunit`) VALUES 
(1, 'Carbon reduction', 'To remove 1 billion tons of carbon dioxide from the atmosphere through the collective actions of our members.', 1e+006, 'Pounds');

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

-- 
-- Table structure for table `c12_teamgoals`
-- 

DROP TABLE IF EXISTS `c12_teamgoals`;
CREATE TABLE IF NOT EXISTS `c12_teamgoals` (
  `goaltypeID` int(10) unsigned NOT NULL auto_increment,
  `goalname` varchar(50) default NULL,
  `goaldescription` mediumtext,
  `goalamount` float default NULL,
  `goalunit` varchar(10) default NULL,
  PRIMARY KEY  (`goaltypeID`),
  UNIQUE KEY `goaltypeID` (`goaltypeID`),
  KEY `goaltypeID_2` (`goaltypeID`)
) TYPE=MyISAM  COMMENT='Team goals (not yet implemented)' AUTO_INCREMENT=1 ;

-- 
-- Dumping data for table `c12_teamgoals`
-- 


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

-- 
-- Table structure for table `c12_teampledges`
-- 

DROP TABLE IF EXISTS `c12_teampledges`;
CREATE TABLE IF NOT EXISTS `c12_teampledges` (
  `goalID` int(11) unsigned default NULL,
  `teamID` int(11) unsigned default NULL
) TYPE=MyISAM COMMENT='Pledges by teams (not currently implemented)';

-- 
-- Dumping data for table `c12_teampledges`
-- 


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

-- 
-- Table structure for table `c12_teams`
-- 

DROP TABLE IF EXISTS `c12_teams`;
CREATE TABLE IF NOT EXISTS `c12_teams` (
  `teamID` int(11) unsigned NOT NULL auto_increment,
  `name` varchar(50) default NULL,
  `description` text,
  `slogan` varchar(255) default NULL,
  `avatar` varchar(50) default NULL,
  `leaderID` int(11) unsigned default NULL,
  `helperID` int(11) unsigned default NULL,
  `creationDate` varchar(50) default NULL,
  PRIMARY KEY  (`teamID`),
  UNIQUE KEY `teamid` (`teamID`),
  KEY `teamid_2` (`teamID`)
) TYPE=MyISAM  COMMENT='Team definitions' AUTO_INCREMENT=2 ;

-- 
-- Dumping data for table `c12_teams`
-- 

INSERT INTO `c12_teams` (`teamID`, `name`, `description`, `slogan`, `avatar`, `leaderID`, `helperID`, `creationDate`) VALUES 
(1, 'Carbon Busters', 'We are where it''s at in carbon reduction!', 'Saving the world, one C12 atom at a time!', NULL, 1, NULL, '1200499258');
