Sha256: fdf726897c275d2f1f32fab34fc50c1f7221d4f52b99693be51dc11489cff5a1
Contents?: true
Size: 619 Bytes
Versions: 12
Compression:
Stored size: 619 Bytes
Contents
class CreateBooks < ActiveRecord::Migration[5.0] def up create_table :books do |t| t.string :title, null: false t.integer :year t.integer :author_id t.string :genre t.text :summary_html t.boolean :active t.datetime :published_at t.decimal :price, precision: 8, scale: 2 t.integer :stars t.string :cover_image_uid t.timestamps(null: false) end add_index :books, :author_id Book.create_translation_table! description: :string end def down drop_table :books Book.drop_translation_table! end end
Version data entries
12 entries across 12 versions & 1 rubygems