This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Adding watched_tokens to the DB

  • Loading branch information...
simonwex committed Aug 8, 2012
1 parent 28b410c commit a2fc1616dd7850b87bca90f4b775298307b6de8f
Showing with 32 additions and 0 deletions.
  1. +10 −0 config/database/migrations.sql
  2. +22 −0 config/database/schema.sql
@@ -12,3 +12,13 @@ ALTER TABLE stories
ADD COLUMN `durable` BOOLEAN DEFAULT 0,
ADD INDEX (durable),
ADD INDEX (seen_at);
+
+
+DROP TABLE IF EXISTS watched_tokens;
+CREATE TABLE watched_tokens (
+ user_id INT NOT NULL,
+ token VARCHAR(255) NOT NULL,
+ created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+
+ PRIMARY KEY (token, user_id)
+) ENGINE=InnoDB;
View
@@ -31,6 +31,8 @@ CREATE TABLE feeds (
title VARCHAR(255) NULL,
verified BOOLEAN DEFAULT 0,
type VARCHAR(255) NULL,
+ -- durable BOOLEAN DEFAULT 0,
+ -- interval INT UNSIGNED DEFAULT 30,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (url, user_id),
@@ -53,3 +55,23 @@ CREATE TABLE users (
PRIMARY KEY (id),
KEY index_userss_on_created_at (created_at)
) ENGINE=InnoDB;
+
+
+DROP TABLE IF EXISTS irc_channels;
+CREATE TABLE irc_channels (
+ name VARCHAR(255) NOT NULL,
+ users INT DEFAULT 0,
+ topic VARCHAR(255) NULL,
+
+ PRIMARY KEY (name)
+) ENGINE=MyISAM;
+
+
+DROP TABLE IF EXISTS watched_tokens;
+CREATE TABLE watched_tokens (
+ user_id INT NOT NULL,
+ token VARCHAR(255) NOT NULL,
+ created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+
+ PRIMARY KEY (token, user_id)
+) ENGINE=InnoDB;

0 comments on commit a2fc161

Please sign in to comment.