aboutsummaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
authorRhenium <rhenium@rhe.jp>2013-11-17 11:21:57 +0900
committerRhenium <rhenium@rhe.jp>2013-11-17 11:21:57 +0900
commit31aabeb149cbefa915775d4c58623b731059c3cf (patch)
treeceeb415a0d4bb1db523fb2e28735c4ca72419537 /db
parentddb1a321dda6e6d5e9867f38129fea44eafb2135 (diff)
downloadaclog-31aabeb149cbefa915775d4c58623b731059c3cf.tar.gz
add in_reply_to support
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20131116225336_add_in_reply_to_column_to_tweet.rb6
-rw-r--r--db/schema.rb4
2 files changed, 9 insertions, 1 deletions
diff --git a/db/migrate/20131116225336_add_in_reply_to_column_to_tweet.rb b/db/migrate/20131116225336_add_in_reply_to_column_to_tweet.rb
new file mode 100644
index 0000000..489fcf1
--- /dev/null
+++ b/db/migrate/20131116225336_add_in_reply_to_column_to_tweet.rb
@@ -0,0 +1,6 @@
+class AddInReplyToColumnToTweet < ActiveRecord::Migration
+ def change
+ add_column :tweets, :in_reply_to_id, :integer, limit: 8
+ add_index :tweets, :in_reply_to_id
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 014a337..2c7e393 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: 20131113033645) do
+ActiveRecord::Schema.define(version: 20131116225336) do
create_table "accounts", force: true do |t|
t.integer "user_id", limit: 8, null: false
@@ -51,8 +51,10 @@ ActiveRecord::Schema.define(version: 20131113033645) do
t.integer "favorites_count", default: 0, null: false
t.integer "retweets_count", default: 0, null: false
t.integer "reactions_count", default: 0, null: false
+ t.integer "in_reply_to_id", limit: 8
end
+ add_index "tweets", ["in_reply_to_id"], name: "index_tweets_on_in_reply_to_id", using: :btree
add_index "tweets", ["reactions_count"], name: "index_tweets_on_reactions_count", using: :btree
add_index "tweets", ["user_id", "reactions_count"], name: "index_tweets_on_user_id_and_reactions_count", using: :btree