Skip to content

Instantly share code, notes, and snippets.

@gnuns
Created July 22, 2015 22:34
Show Gist options
  • Save gnuns/c1ecf30ef5176b03e1ef to your computer and use it in GitHub Desktop.
Save gnuns/c1ecf30ef5176b03e1ef to your computer and use it in GitHub Desktop.
Watchr DB
-- phpMyAdmin SQL Dump
-- version 4.4.6
-- http://www.phpmyadmin.net
--
-- Generation Time: Jul 22, 2015 at 04:46 AM
-- Server version: 10.0.20-MariaDB-log
-- PHP Version: 5.6.11
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 */;
--
-- Database: `watchr`
--
-- --------------------------------------------------------
--
-- Table structure for table `urls`
--
CREATE TABLE IF NOT EXISTS `urls` (
`id` int(11) NOT NULL,
`access_code` varchar(64) NOT NULL,
`creation_timestamp` int(64) NOT NULL,
`destination_url` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `url_logs`
--
CREATE TABLE IF NOT EXISTS `url_logs` (
`id` int(11) NOT NULL,
`url_id` int(11) NOT NULL,
`timestamp` int(64) NOT NULL,
`ip_address` varchar(32) NOT NULL,
`user_agent` varchar(255) NOT NULL,
`referring_url` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `urls`
--
ALTER TABLE `urls`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `url_logs`
--
ALTER TABLE `url_logs`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for table `urls`
--
ALTER TABLE `urls`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `url_logs`
--
ALTER TABLE `url_logs`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
/*!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 */;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment