Remove unused columns from podcast_episodes (#7126)

* Remove unused columns from podcast_episodes

* Do not remove duration_in_seconds
This commit is contained in:
rhymes 2020-04-07 20:24:05 +02:00 committed by GitHub
parent 25bac7db96
commit c10518cd7a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 8 deletions

View file

@ -1,10 +1,6 @@
class PodcastEpisode < ApplicationRecord
self.ignored_columns = %w[
deepgram_id_code
duration_in_seconds
featured
featured_number
order_key
]
include AlgoliaSearch

View file

@ -0,0 +1,10 @@
class RemoveUnusedColumnsFromPodcastEpisodes < ActiveRecord::Migration[5.2]
def change
safety_assured do
remove_column :podcast_episodes, :deepgram_id_code, :string
remove_column :podcast_episodes, :featured, :boolean, default: true
remove_column :podcast_episodes, :featured_number, :integer
remove_column :podcast_episodes, :order_key, :string
end
end
end

View file

@ -762,16 +762,12 @@ ActiveRecord::Schema.define(version: 2020_04_07_091449) do
t.text "body"
t.integer "comments_count", default: 0, null: false
t.datetime "created_at", null: false
t.string "deepgram_id_code"
t.integer "duration_in_seconds"
t.boolean "featured", default: true
t.integer "featured_number"
t.string "guid", null: false
t.boolean "https", default: true
t.string "image"
t.string "itunes_url"
t.string "media_url", null: false
t.string "order_key"
t.integer "podcast_id"
t.text "processed_html"
t.datetime "published_at"