forked from btrott/tiptop
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Oops, forgot instructions for setting up mysql db.
- Loading branch information
Benjamin Trott
committed
Dec 9, 2009
1 parent
c0252fe
commit 8bd4b5c
Showing
3 changed files
with
56 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
DROP TABLE IF EXISTS asset; | ||
CREATE TABLE asset ( | ||
asset_id INTEGER UNSIGNED auto_increment NOT NULL, | ||
api_id VARCHAR(75) NOT NULL, | ||
person_id INTEGER UNSIGNED NOT NULL, | ||
title VARCHAR(255), | ||
content MEDIUMBLOB, | ||
permalink VARCHAR(255), | ||
created DATETIME, | ||
favorite_count INTEGER UNSIGNED, | ||
links_json MEDIUMBLOB, | ||
object_type VARCHAR(15), | ||
PRIMARY KEY (asset_id), | ||
INDEX (api_id), | ||
INDEX (person_id, created), | ||
INDEX (created), | ||
INDEX (favorite_count) | ||
); | ||
|
||
DROP TABLE IF EXISTS person; | ||
CREATE TABLE person ( | ||
person_id INTEGER UNSIGNED auto_increment NOT NULL, | ||
api_id VARCHAR(18) NOT NULL, | ||
display_name VARCHAR(100), | ||
avatar_uri VARCHAR(255), | ||
PRIMARY KEY (person_id), | ||
INDEX (api_id) | ||
); | ||
|
||
DROP TABLE IF EXISTS favorited_by; | ||
CREATE TABLE favorited_by ( | ||
asset_id INTEGER UNSIGNED NOT NULL, | ||
person_id INTEGER UNSIGNED NOT NULL, | ||
api_id VARCHAR(53) NOT NULL, | ||
INDEX (asset_id), | ||
UNIQUE (api_id) | ||
); | ||
|
||
DROP TABLE IF EXISTS last_event_id; | ||
CREATE TABLE last_event_id ( | ||
api_id varchar(34) NOT NULL | ||
); | ||
|
||
DROP TABLE IF EXISTS stream; | ||
CREATE TABLE stream ( | ||
person_id INTEGER UNSIGNED NOT NULL, | ||
asset_id INTEGER UNSIGNED NOT NULL, | ||
PRIMARY KEY (person_id, asset_id) | ||
); |