20170119214911_create_preview_cards.rb 394 B

1234567891011121314151617
  1. class CreatePreviewCards < ActiveRecord::Migration[5.0]
  2. def change
  3. create_table :preview_cards do |t|
  4. t.integer :status_id
  5. t.string :url, null: false, default: ''
  6. # OpenGraph
  7. t.string :title, null: true
  8. t.string :description, null: true
  9. t.attachment :image
  10. t.timestamps
  11. end
  12. add_index :preview_cards, :status_id, unique: true
  13. end
  14. end