diff options
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20130403114115_create_stolen_tweets.rb | 11 | ||||
-rw-r--r-- | db/migrate/20130403160821_create_issues.rb | 14 | ||||
-rw-r--r-- | db/schema.rb | 21 |
3 files changed, 45 insertions, 1 deletions
diff --git a/db/migrate/20130403114115_create_stolen_tweets.rb b/db/migrate/20130403114115_create_stolen_tweets.rb new file mode 100644 index 0000000..7dbe8c9 --- /dev/null +++ b/db/migrate/20130403114115_create_stolen_tweets.rb @@ -0,0 +1,11 @@ +class CreateStolenTweets < ActiveRecord::Migration + def change + create_table :stolen_tweets do |t| + t.integer :tweet_id, :limit => 8 + t.integer :original_id, :limit => 8 + end + + add_index :stolen_tweets, :tweet_id, :unique => true + add_index :stolen_tweets, :original_id + end +end diff --git a/db/migrate/20130403160821_create_issues.rb b/db/migrate/20130403160821_create_issues.rb new file mode 100644 index 0000000..ea68724 --- /dev/null +++ b/db/migrate/20130403160821_create_issues.rb @@ -0,0 +1,14 @@ +class CreateIssues < ActiveRecord::Migration + def change + create_table :issues do |t| + t.integer :issue_type, :limit => 2 + t.integer :status, :limit => 2 + t.text :data + + t.timestamps + end + + add_index :issues, :issue_type + add_index :issues, :status + end +end diff --git a/db/schema.rb b/db/schema.rb index 0efc468..817847c 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20130323045606) do +ActiveRecord::Schema.define(version: 20130403160821) do create_table "accounts", force: true do |t| t.integer "user_id", limit: 8, null: false @@ -33,6 +33,17 @@ ActiveRecord::Schema.define(version: 20130323045606) do add_index "favorites", ["tweet_id"], name: "index_favorites_on_tweet_id" add_index "favorites", ["user_id"], name: "index_favorites_on_user_id" + create_table "issues", force: true do |t| + t.integer "issue_type", limit: 2 + t.integer "status", limit: 2 + t.text "data" + t.datetime "created_at" + t.datetime "updated_at" + end + + add_index "issues", ["issue_type"], name: "index_issues_on_issue_type" + add_index "issues", ["status"], name: "index_issues_on_status" + create_table "retweets", force: true do |t| t.integer "tweet_id", limit: 8, null: false t.integer "user_id", limit: 8, null: false @@ -42,6 +53,14 @@ ActiveRecord::Schema.define(version: 20130323045606) do add_index "retweets", ["tweet_id"], name: "index_retweets_on_tweet_id" add_index "retweets", ["user_id"], name: "index_retweets_on_user_id" + create_table "stolen_tweets", force: true do |t| + t.integer "tweet_id", limit: 8 + t.integer "original_id", limit: 8 + end + + add_index "stolen_tweets", ["original_id"], name: "index_stolen_tweets_on_original_id" + add_index "stolen_tweets", ["tweet_id"], name: "index_stolen_tweets_on_tweet_id", unique: true + create_table "tweets", force: true do |t| t.text "text", null: false t.text "source" |