diff options
author | re4k <re4k@re4k.info> | 2013-03-23 19:22:25 +0900 |
---|---|---|
committer | re4k <re4k@re4k.info> | 2013-03-23 19:22:25 +0900 |
commit | 80eca202c9ae3b3a6098c1654a530b1cd46326cf (patch) | |
tree | fca38131a5cd9acefa24cd50fc00870099d2d787 /db | |
parent | 773d8610cda565a0bd395f16d94bbda912273237 (diff) | |
download | aclog-80eca202c9ae3b3a6098c1654a530b1cd46326cf.tar.gz |
refactor
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20130322152541_add_user_id_index_to_events.rb | 6 | ||||
-rw-r--r-- | db/migrate/20130322171251_add_column_consumer_version_to_accounts.rb | 5 | ||||
-rw-r--r-- | db/migrate/20130323045606_add_protected_to_users.rb | 5 | ||||
-rw-r--r-- | db/schema.rb | 6 |
4 files changed, 21 insertions, 1 deletions
diff --git a/db/migrate/20130322152541_add_user_id_index_to_events.rb b/db/migrate/20130322152541_add_user_id_index_to_events.rb new file mode 100644 index 0000000..8543185 --- /dev/null +++ b/db/migrate/20130322152541_add_user_id_index_to_events.rb @@ -0,0 +1,6 @@ +class AddUserIdIndexToEvents < ActiveRecord::Migration + def change + add_index :favorites, :user_id + add_index :retweets, :user_id + end +end diff --git a/db/migrate/20130322171251_add_column_consumer_version_to_accounts.rb b/db/migrate/20130322171251_add_column_consumer_version_to_accounts.rb new file mode 100644 index 0000000..747287b --- /dev/null +++ b/db/migrate/20130322171251_add_column_consumer_version_to_accounts.rb @@ -0,0 +1,5 @@ +class AddColumnConsumerVersionToAccounts < ActiveRecord::Migration + def change + add_column :accounts, :consumer_version, :integer + end +end diff --git a/db/migrate/20130323045606_add_protected_to_users.rb b/db/migrate/20130323045606_add_protected_to_users.rb new file mode 100644 index 0000000..dcc85f6 --- /dev/null +++ b/db/migrate/20130323045606_add_protected_to_users.rb @@ -0,0 +1,5 @@ +class AddProtectedToUsers < ActiveRecord::Migration + def change + add_column :users, :protected, :boolean + end +end diff --git a/db/schema.rb b/db/schema.rb index 4ec571b..d8b9299 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: 20130226151042) do +ActiveRecord::Schema.define(version: 20130323045606) do create_table "accounts", force: true do |t| t.integer "user_id", limit: 8, null: false @@ -19,6 +19,7 @@ ActiveRecord::Schema.define(version: 20130226151042) do t.string "oauth_token_secret", null: false t.datetime "created_at" t.datetime "updated_at" + t.integer "consumer_version" end add_index "accounts", ["user_id"], name: "index_accounts_on_user_id", unique: true @@ -30,6 +31,7 @@ ActiveRecord::Schema.define(version: 20130226151042) do add_index "favorites", ["tweet_id", "user_id"], name: "index_favorites_on_tweet_id_and_user_id", unique: true add_index "favorites", ["tweet_id"], name: "index_favorites_on_tweet_id" + add_index "favorites", ["user_id"], name: "index_favorites_on_user_id" create_table "retweets", force: true do |t| t.integer "tweet_id", limit: 8, null: false @@ -37,6 +39,7 @@ ActiveRecord::Schema.define(version: 20130226151042) do end add_index "retweets", ["tweet_id"], name: "index_retweets_on_tweet_id" + add_index "retweets", ["user_id"], name: "index_retweets_on_user_id" create_table "tweets", force: true do |t| t.text "text", null: false @@ -53,6 +56,7 @@ ActiveRecord::Schema.define(version: 20130226151042) do t.text "profile_image_url" t.datetime "created_at" t.datetime "updated_at" + t.boolean "protected" end add_index "users", ["screen_name"], name: "index_users_on_screen_name" |