Sha256: 077f5479d85ca7f770c9feb6ef7d6987fdc923977f9ce36dd7bb4d1fab150cb3

Contents?: true

Size: 617 Bytes

Versions: 6

Compression:

Stored size: 617 Bytes

Contents

class CreateCardboardFields < ActiveRecord::Migration
  def change
    create_table :cardboard_fields do |t|
      t.string :identifier
      t.string :label
      t.string :type
      t.boolean :required, default: true
      t.belongs_to :page_part
      t.integer :position
      t.text :value_uid
      t.string :hint
      t.string :placeholder
      t.integer :object_with_field_id
      t.string :object_with_field_type

      t.timestamps
    end
    add_index :cardboard_fields, :identifier
    add_index :cardboard_fields, [:object_with_field_id, :object_with_field_type], :name => 'parent_object'
  end
end

Version data entries

6 entries across 3 versions & 1 rubygems

Version Path
cardboard_cms-0.1.8 lib/generators/cardboard/install/templates/migrations/1_create_cardboard_fields.rb
cardboard_cms-0.1.8 test/dummy/db/migrate/20130522151358_create_cardboard_fields.rb
cardboard_cms-0.1.6 lib/generators/cardboard/install/templates/migrations/1_create_cardboard_fields.rb
cardboard_cms-0.1.6 test/dummy/db/migrate/20130522151358_create_cardboard_fields.rb
cardboard_cms-0.1.4 lib/generators/cardboard/install/templates/migrations/1_create_cardboard_fields.rb
cardboard_cms-0.1.4 test/dummy/db/migrate/20130522151358_create_cardboard_fields.rb