-- http://www.phpmyadmin.net
--




--
-- Database: `clickinity`
--

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

--
-- Table structure for table `app_details`
--

CREATE TABLE `app_details` (
  `current_counter` int(11) DEFAULT NULL,
  `next_winning_number` int(11) DEFAULT NULL,
  `next_community_goal` int(11) DEFAULT NULL,
  `last_winner_id` int(11) DEFAULT NULL,
  `last_winning_number` int(11) DEFAULT NULL,
  `last_winning_community_goal` int(11) DEFAULT NULL,
  `next_hidden_goal` int(11) DEFAULT NULL,
  `id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `app_details`
--

INSERT INTO `app_details` (`current_counter`, `next_winning_number`, `next_community_goal`, `last_winner_id`, `last_winning_number`, `last_winning_community_goal`, `next_hidden_goal`, `id`) VALUES
(2234, 60, 6000, NULL, NULL, NULL, NULL, 1);

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

--
-- Table structure for table `rewards`
--

CREATE TABLE `rewards` (
  `id` int(11) NOT NULL,
  `reward` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `winners`
--

CREATE TABLE `winners` (
  `id` int(11) NOT NULL,
  `user_id` int(11) DEFAULT NULL,
  `milestone` double DEFAULT NULL,
  `type` int(11) DEFAULT NULL,
  `reward_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `winning_stages`
--

CREATE TABLE `winning_stages` (
  `id` int(11) NOT NULL,
  `clicks` int(11) DEFAULT NULL,
  `type` int(11) DEFAULT NULL,
  `reward_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `winning_stages`
--

INSERT INTO `winning_stages` (`id`, `clicks`, `type`, `reward_id`) VALUES
(1, 1, 1, NULL),
(2, 50, 1, NULL),
(3, 100, 1, NULL),
(4, 500, 1, NULL),
(5, 1000, 1, NULL),
(6, 5000, 1, NULL),
(7, 10000, 1, NULL),
(8, 50000, 1, NULL),
(9, 100000, 1, NULL),
(10, 500000, 1, NULL),
(11, 1000000, 1, NULL),
(12, 5000000, 1, NULL),
(13, 10000000, 1, NULL);

--
-- Indexes for dumped tables
--

--
-- Indexes for table `app_details`
--
ALTER TABLE `app_details`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `winners`
--
ALTER TABLE `winners`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `winning_stages`
--
ALTER TABLE `winning_stages`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `app_details`
--
ALTER TABLE `app_details`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `winners`
--
ALTER TABLE `winners`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `winning_stages`
--
ALTER TABLE `winning_stages`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;
