[deploy] Optimization:Change Tweet Primary Key to Bigint (#9409)

This commit is contained in:
Molly Struve 2020-07-21 08:08:52 -05:00 committed by GitHub
parent e3455ef921
commit d79a2133f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 2 deletions

View file

@ -0,0 +1,13 @@
class ChangeTweetPKtoBigint < ActiveRecord::Migration[6.0]
def up
safety_assured {
change_column :tweets, :id, :bigint
}
end
def down
safety_assured {
change_column :tweets, :id, :int
}
end
end

View file

@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2020_07_20_143134) do
ActiveRecord::Schema.define(version: 2020_07_20_213710) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@ -1080,7 +1080,7 @@ ActiveRecord::Schema.define(version: 2020_07_20_143134) do
t.index ["social_preview_template"], name: "index_tags_on_social_preview_template"
end
create_table "tweets", id: :serial, force: :cascade do |t|
create_table "tweets", force: :cascade do |t|
t.datetime "created_at", null: false
t.text "extended_entities_serialized", default: "--- {}\n"
t.integer "favorite_count"