Sha256: 81fb5a200795618e50cbd21b338b49bcb718164640bd4c97928ee1c4338e3e4d

Contents?: true

Size: 303 Bytes

Versions: 12

Compression:

Stored size: 303 Bytes

Contents

class CreateHeaders < ActiveRecord::Migration
  def up
    create_table :headers do |t|
      t.string :name
      t.string :photo
      t.timestamps
    end
    Header.create_translation_table!({ name: :string })
  end
  
  def down
    drop_table :headers
    Header.drop_translation_table!
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
tkh_illustrations-0.9.6 lib/generators/tkh_illustrations/create_or_update_migrations/templates/create_headers.rb
tkh_illustrations-0.9.5 lib/generators/tkh_illustrations/create_or_update_migrations/templates/create_headers.rb
tkh_illustrations-0.9.4 lib/generators/tkh_illustrations/create_or_update_migrations/templates/create_headers.rb
tkh_illustrations-0.9.3 lib/generators/tkh_illustrations/create_or_update_migrations/templates/create_headers.rb
tkh_illustrations-0.9.2 lib/generators/tkh_illustrations/create_or_update_migrations/templates/create_headers.rb
tkh_illustrations-0.9.1 lib/generators/tkh_illustrations/create_or_update_migrations/templates/create_headers.rb
tkh_illustrations-0.2.5 lib/generators/tkh_illustrations/create_or_update_migrations/templates/create_headers.rb
tkh_illustrations-0.9 lib/generators/tkh_illustrations/create_or_update_migrations/templates/create_headers.rb
tkh_illustrations-0.2.4 lib/generators/tkh_illustrations/create_or_update_migrations/templates/create_headers.rb
tkh_illustrations-0.2.3 lib/generators/tkh_illustrations/create_or_update_migrations/templates/create_headers.rb
tkh_illustrations-0.2 lib/generators/tkh_illustrations/create_or_update_migrations/templates/create_headers.rb
tkh_illustrations-0.1 lib/generators/tkh_illustrations/create_or_update_migrations/templates/create_headers.rb