-- phpMyAdmin SQL Dump
-- version 4.0.8
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jan 12, 2016 at 11:53 AM
-- Server version: 5.5.25-log
-- PHP Version: 5.5.5
ALTER TABLE `site_settings` ADD `paypal_email` VARCHAR( 1000 ) NOT NULL ;
ALTER TABLE `site_settings` ADD `paypal_currency` VARCHAR( 100 ) NOT NULL ;
ALTER TABLE `site_settings` ADD `payment_enabled` INT( 11 ) NOT NULL ;
ALTER TABLE `site_settings` ADD `payment_symbol` VARCHAR( 5 ) NOT NULL DEFAULT '$';
CREATE TABLE IF NOT EXISTS `ipn_log` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `data` text NOT NULL,
  `timestamp` int(11) NOT NULL,
  `IP` varchar(500) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
CREATE TABLE IF NOT EXISTS `payment_logs` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `userid` int(11) NOT NULL,
  `amount` decimal(10,2) NOT NULL,
  `timestamp` int(11) NOT NULL,
  `email` varchar(500) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
ALTER TABLE `users` ADD `points` DECIMAL( 10, 2 ) NOT NULL ;
ALTER TABLE `users` ADD `premium_time` INT( 11 ) NOT NULL ;

CREATE TABLE IF NOT EXISTS `payment_plans` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `hexcolor` varchar(6) NOT NULL,
  `fontcolor` varchar(6) NOT NULL,
  `cost` decimal(10,2) NOT NULL,
  `days` int(11) NOT NULL,
  `sales` int(11) NOT NULL,
  `description` varchar(255) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;

--
-- Dumping data for table `payment_plans`
--

INSERT INTO `payment_plans` (`ID`, `name`, `hexcolor`, `fontcolor`, `cost`, `days`, `sales`, `description`) VALUES
(2, 'BASIC', '68aa9b', 'FFFFFF', '3.00', 30, 2, 'This is the basic plan which gives you a introduction to our Premium Plans'),
(3, 'Professional', '416375', 'FFFFFF', '7.99', 90, 2, 'Get all the benefits of basic at a cheaper price and gain content for longer.'),
(4, 'LIFETIME', '578465', 'FFFFFF', '300.00', 0, 1, 'Become a premium member for life and have access to all our premium content.');

ALTER TABLE `site_settings` ADD `global_premium` INT( 11 ) NOT NULL ;

CREATE TABLE IF NOT EXISTS `payment_logs` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `userid` int(11) NOT NULL,
  `amount` decimal(10,2) NOT NULL,
  `timestamp` int(11) NOT NULL,
  `email` varchar(500) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
