-- phpMyAdmin SQL Dump
-- version 3.4.3.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jul 29, 2011 at 03:24 PM
-- Server version: 5.0.84
-- PHP Version: 5.2.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 */;

--
-- Database: `apns`
--

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

--
-- Table structure for table `application_device`
--

CREATE TABLE IF NOT EXISTS `application_device` (
  `application_id` int(20) default NULL,
  `app_dev_id` bigint(20) NOT NULL default '0',
  `device_model` varchar(100) default NULL,
  `create_date` datetime default NULL,
  `device_token` varchar(100) default NULL,
  `installed` int(11) default '1',
  `modify_date` datetime default NULL,
  `os_version` varchar(100) default NULL,
  `region` varchar(100) default NULL,
  `deactivated_date` datetime default NULL,
  `udid` varchar(100) default NULL,
  `app_version` varchar(100) default NULL,
  `saved_count` int(11) default NULL,
  `max_saved` int(11) default NULL,
  `article_font_size` int(11) default NULL,
  `android_message_ID` varchar(100) default NULL,
  PRIMARY KEY  (`app_dev_id`),
  UNIQUE KEY `application_id_2` (`application_id`,`udid`),
  KEY `application_id` (`application_id`),
  KEY `application_id_3` (`application_id`,`installed`),
  KEY `installed` (`installed`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `app_dev_not_type`
--

CREATE TABLE IF NOT EXISTS `app_dev_not_type` (
  `app_dev_Id` bigint(20) NOT NULL default '0',
  `not_type_id` int(11) NOT NULL default '0',
  `active` int(11) default '1',
  `create_date` datetime default NULL,
  `modify_date` datetime default NULL,
  PRIMARY KEY  (`app_dev_Id`,`not_type_id`),
  KEY `app_dev_Id` (`app_dev_Id`),
  KEY `app_dev_Id_3` (`app_dev_Id`,`active`),
  KEY `idx_not_type_id` (`not_type_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `device_notification`
--

CREATE TABLE IF NOT EXISTS `device_notification` (
  `device_id` bigint(20) NOT NULL default '0',
  `notification_id` bigint(20) NOT NULL default '0',
  PRIMARY KEY  (`device_id`,`notification_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `eo_pk_table`
--

CREATE TABLE IF NOT EXISTS `eo_pk_table` (
  `NAME` char(40) default NULL,
  `PK` bigint(20) default NULL,
  KEY `NAME` (`NAME`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `notification`
--

CREATE TABLE IF NOT EXISTS `notification` (
  `notification_id` bigint(20) unsigned NOT NULL default '0',
  `text_contents` varchar(4096) default '',
  `create_date` datetime default NULL,
  `notification_type_id` int(11) default '1',
  `application_id` int(11) default NULL,
  `minutes_to_expire` int(11) default NULL,
  `story_guid` varchar(100) default NULL,
  `not_identifier` varchar(100) default NULL,
  `modify_date` datetime default NULL,
  `active` int(11) default '1',
  `pushed` int(11) default '1',
  `expiration_date` datetime default NULL,
  `custom_title` varchar(100) default NULL,
  PRIMARY KEY  (`notification_id`),
  KEY `idx_app_id` (`application_id`),
  KEY `idx_notification_type_id` (`notification_type_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `notification_type`
--

CREATE TABLE IF NOT EXISTS `notification_type` (
  `notification_type_id` int(11) NOT NULL default '0',
  `type_name` varchar(100) default NULL,
  `default_minutes_to_expire` int(11) default NULL,
  `active` int(11) default '1',
  PRIMARY KEY  (`notification_type_id`),
  KEY `type_name` (`type_name`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

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

CREATE TABLE IF NOT EXISTS `person` (
  `id` int(11) NOT NULL default '0',
  `username` varchar(100) default NULL,
  `password` varchar(100) default NULL,
  `user_typeID` int(11) default NULL,
  PRIMARY KEY  (`id`),
  UNIQUE KEY `idx_username` (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `push_application`
--

CREATE TABLE IF NOT EXISTS `push_application` (
  `application_id` int(11) NOT NULL default '0',
  `application_name` varchar(100) default NULL,
  `certificate` varchar(100) default NULL,
  `certificate_password` varchar(100) default NULL,
  `android_auth_token` varchar(100) default NULL,
  `platform` int(11) NOT NULL,
  `versionId` varchar(10) default NULL,
  PRIMARY KEY  (`application_id`),
  UNIQUE KEY `application_name` (`application_name`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `user_type`
--

CREATE TABLE IF NOT EXISTS `user_type` (
  `id` int(11) NOT NULL default '0',
  `type_name` varchar(10) default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `_dbupdater`
--

CREATE TABLE IF NOT EXISTS `_dbupdater` (
  `lockowner` varchar(100) default NULL,
  `modelname` varchar(100) NOT NULL,
  `updatelock` int(11) NOT NULL,
  `version` int(11) NOT NULL,
  UNIQUE KEY `unique_model` (`modelname`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

/*!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 */;
