Permalink
Fetching contributors…
Cannot retrieve contributors at this time
115 lines (99 sloc) 3.88 KB
DROP TABLE IF EXISTS `FlickrPhotos`;
CREATE TABLE `FlickrPhotos` (
`id` BIGINT(20) UNSIGNED NOT NULL,
`user_id` INT(11) UNSIGNED NOT NULL,
`perms` TINYINT(3) UNSIGNED NOT NULL,
`secret` CHAR(10) NOT NULL,
`server` MEDIUMINT(8) UNSIGNED NOT NULL,
`farm` TINYINT(3) UNSIGNED NOT NULL,
`originalsecret` CHAR(10) NOT NULL,
`originalformat` CHAR(10) NOT NULL,
`title` VARCHAR(255) NOT NULL,
`tags` TEXT NOT NULL,
`media` TINYINT(3) UNSIGNED NOT NULL,
`dateupload` DATETIME,
`datetaken` DATETIME,
`datetakengranularity` TINYINT(3) UNSIGNED NOT NULL,
`hasgeo` TINYINT(3) UNSIGNED NOT NULL,
`hasexif` TINYINT(3) UNSIGNED NOT NULL,
`latitude` DECIMAL(9,6) DEFAULT NULL,
`longitude` DECIMAL(9,6) DEFAULT NULL,
`accuracy` TINYINT(3) UNSIGNED NOT NULL,
`woeid` INT(11) UNSIGNED NOT NULL,
`geoperms` TINYINT(3) UNSIGNED NOT NULL,
`geocontext` TINYINT(3) UNSIGNED NOT NULL,
`deleted` INT(11) UNSIGNED NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `FlickrFaves`;
CREATE TABLE `FlickrFaves` (
`user_id` INT(11) UNSIGNED NOT NULL,
`photo_id` BIGINT(20) UNSIGNED NOT NULL,
`owner_id` INT(11) UNSIGNED NOT NULL,
`date_faved` INT(11) UNSIGNED NOT NULL,
UNIQUE KEY `by_fave` (`photo_id`, `user_id`),
KEY `by_user` (`user_id`, `date_faved`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `FlickrFavesUsers`;
CREATE TABLE `FlickrFavesUsers` (
`user_id` int(11) unsigned NOT NULL,
`photo_id` bigint(20) unsigned NOT NULL,
`viewer_id` int(11) unsigned NOT NULL,
UNIQUE KEY `by_viewer` (`viewer_id`,`photo_id`),
UNIQUE KEY `by_owner` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `FlickrContacts`;
CREATE TABLE `FlickrContacts` (
`user_id` INT(11) UNSIGNED NOT NULL,
`contact_id` INT(11) UNSIGNED NOT NULL,
`contact_nsid` VARCHAR(20) NOT NULL,
`rel` TINYINT(3) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `FlickrPushSubscriptions`;
CREATE TABLE `FlickrPushSubscriptions` (
`id` int(11) unsigned NOT NULL,
`user_id` int(11) unsigned NOT NULL,
`topic_id` tinyint(3) unsigned NOT NULL,
`topic_args` VARCHAR(255) NOT NULL,
`secret_url` char(64) CHARACTER SET latin1 NOT NULL,
`verify_token` char(32) CHARACTER SET latin1 NOT NULL,
`created` int(10) unsigned NOT NULL,
`verified` int(10) unsigned NOT NULL,
`last_update` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `by_topic` (`user_id`,`topic_id`, `topic_args`),
KEY `by_user` (`user_id`,`topic_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `FlickrPushPhotos`;
CREATE TABLE `FlickrPushPhotos` (
`user_id` INT(11) UNSIGNED NOT NULL,
`subscription_id` INT(11) UNSIGNED NOT NULL,
`created` INT(11) UNSIGNED NOT NULL,
`photo_id` BIGINT(20) UNSIGNED NOT NULL,
`photo_data` TEXT,
KEY `by_sub_id` (`subscription_id`, `created`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `FlickrPhotosGeoCorrections`;
CREATE TABLE `FlickrPhotosGeoCorrections` (
`photo_id` BIGINT(20) UNSIGNED NOT NULL,
`user_id` INT(11) UNSIGNED NOT NULL,
`created` INT(11) UNSIGNED NOT NULL,
`old_woeid` INT(11) UNSIGNED NOT NULL,
`new_woeid` INT(11) UNSIGNED NOT NULL,
UNIQUE KEY `by_photo` (`photo_id`, `created`),
KEY `by_time` (`created`),
KEY `by_user_old` (`user_id`, `old_woeid`),
KEY `by_user_new` (`user_id`, `new_woeid`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `FlickrGeoBookmarks`;
CREATE TABLE `FlickrGeoBookmarks` (
`id` BIGINT(20) UNSIGNED NOT NULL,
`user_id` INT(11) UNSIGNED NOT NULL,
`name` VARCHAR(255),
`latitude` DECIMAL(9,6) DEFAULT NULL,
`longitude` DECIMAL(9,6) DEFAULT NULL,
`accuracy` TINYINT(3) UNSIGNED NOT NULL,
`woeid` INT(11) UNSIGNED NOT NULL,
`geoperms` TINYINT(3) UNSIGNED NOT NULL,
`geocontext` TINYINT(3) UNSIGNED NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;