#CREATE DATABASE scopus;
#USE scopus;


#
# Table structure for table ‘publications’
#

CREATE TABLE IF NOT EXISTS publications (
    id INT AUTO_INCREMENT PRIMARY KEY,
    scopusid varchar(255) default NULL,
    eid varchar(255) default NULL,
    wpid int default NULL,
    citedbycount int default NULL,
    citesloaded int default NULL,
    categories varchar(255) default NULL,
    doi varchar(255) default NULL,
    scopusdata text default NULL,
    title varchar(255) default NULL,
    abstract text,
    bibtex text,
    ts datetime,
    UNIQUE KEY(scopusid)
);


CREATE TABLE IF NOT EXISTS citations (
    id INT AUTO_INCREMENT PRIMARY KEY,
    scopusid varchar(255) default NULL,
    eid varchar(255) default NULL,
    wpid int default NULL,
    wpcommentid int default NULL,
    citedbycount int default NULL,
    citesloaded int default NULL,
    categories varchar(255) default NULL,
    doi varchar(255) default NULL,
    scopusdata text default NULL,
    author  varchar(255) default NULL,
    title varchar(255) default NULL,
    journal varchar(255) default NULL,
    volume varchar(255) default NULL,
    pages varchar(255) default NULL,
    articleno varchar(255) default NULL,
    abstract text,
    bibtex text,
    ts datetime,
    UNIQUE KEY(wpid,scopusid)
);



# Todo: Save the full details of all publications
# Use json serialisation !!!
#
