Files
redux-scraper/db/migrate/20241224060756_create_indexed_posts.rb
2025-01-01 03:29:53 +00:00

14 lines
361 B
Ruby

# typed: true
class CreateIndexedPosts < ActiveRecord::Migration[7.2]
def change
create_table :indexed_posts do |t|
t.integer :postable_id, null: false
t.string :postable_type, null: false
t.timestamps
end
add_index :indexed_posts, %i[postable_id postable_type], unique: true
add_index :indexed_posts, :created_at
end
end