Sha256: 793206df4a7d2304fe8b0a5d39f61415cbb92b9d89e81534569e243a35561390

Contents?: true

Size: 881 Bytes

Versions: 3

Compression:

Stored size: 881 Bytes

Contents

ActiveRecord::Schema.define :version => 0 do
  create_table :custom_attributes, :force => true do |t|
		# label
    t.string :field_name
    t.string :field_label

    # value type
    t.string :value_type
		
		# fields for value storage
    t.string :text_value
    t.datetime :date_time_value
    t.integer :number_value
    t.float :float_value

		# sorting
    t.integer :position
		# link to object
    t.references :item, :polymorphic => true

    t.timestamps
  end

  add_index :custom_attributes, :value_type
  add_index :custom_attributes, [:item_id, :item_type]

  create_table "people", :force => true do |t|
    t.string :name
    t.date :born_on
    t.string :email
  end

  create_table "products", :force => true do |t|
    t.string :name
    t.float :width
    t.float :height
  end

  create_table "locations", :force => true do |t|
    t.string :name
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
custom-attributes-0.1.1 spec/schema.rb
custom-attributes-0.1.0 spec/schema.rb
custom-attributes-0.0.1 spec/schema.rb