#-----------------------------------
#-- Database
#-----------------------------------

CREATE DATABASE IF NOT EXISTS parss;
USE parss;

#------------------------------
#-- Database-User
#------------------------------

GRANT SELECT,INSERT,UPDATE,DELETE ON parss.* TO parss@localhost IDENTIFIED BY 'parss';

#------------------------------
# Table structure for PARSS_FEED
#------------------------------
create table PARSS_FEED (
   FEED_ID mediumint(10) not null default '0',
   FEED_URL text not null,
   FEED_ETAG varchar(255),
   FEED_TITLE varchar(255),
   FEED_SOURCE mediumtext,
   FEED_ITEMS mediumtext,
   FEED_RENDERED mediumtext,
   FEED_AGGREGATE tinyint(1),
   FEED_ERRORS tinyint(255),
   FEED_BLOCKED tinyint(1),
   FEED_THREEOFOURS mediumint(10),
   FEED_KHARMA mediumint(10),
   FEED_DELAY tinyint(255),
   FEED_TYPE varchar(10),
   FEED_VERSION varchar(10),
   FEED_ABOUT varchar(255),
   FEED_LINK varchar(255),
   FEED_DESCRIPTION text,
   FEED_IMAGE text,
   FEED_TEXTINPUT text,
   FEED_LANGUAGE varchar(10),
   FEED_PUBLISHER varchar(255),
   FEED_CREATOR varchar(255),
   FEED_RIGHTS varchar(255),
   FEED_PUBDATE datetime,
   FEED_UPDATEPERIOD varchar(255),
   FEED_UPDATEFREQ tinyint(24),
   FEED_UPDATEBASE datetime,
   FEED_F_USER_CREATOR mediumint(10),
   FEED_F_USER_MODIFIER mediumint(10),
   FEED_LASTPING datetime,
   FEED_LASTUPDATE datetime,
   FEED_CREATETIME datetime,
   FEED_MODIFYTIME datetime,
   primary key (FEED_ID)
);

#----------------------------
# Table structure for PARSS_USER
#----------------------------
create table PARSS_USER (
   USER_ID mediumint(10) not null default '0',
   USER_EMAIL varchar(255),
   USER_KEY varchar(255),
   USER_REQUESTS mediumint(10),
   USER_CREDIT mediumint(10),
   USER_TRUSTED tinyint(1),
   USER_BLOCKED tinyint(1),
   USER_MODIFYTIME datetime,
   USER_CREATETIME datetime,
   primary key (USER_ID)
);
