Commit 5f23eb3f authored by Fernando D'Agostino's avatar Fernando D'Agostino
Browse files

Add description attribute into the Samples table

parent 02274564
......@@ -9,6 +9,6 @@ class Sample < ActiveRecord::Base
has_many :reactions_as_starting_material, through: :reactions_starting_material_samples, source: :reaction
has_many :reactions_as_reactant, through: :reactions_reactant_samples, source: :reaction
has_many :reactions_as_product, through: :reactions_product_samples, source: :reaction
composed_of :amount, mapping: %w(amount_value, amount_unit)
composed_of :amount, mapping: %w(amount_value, amount_unit)
end
class AddDescriptionAttrToSamples < ActiveRecord::Migration
def change
add_column :samples, :description, :text
end
end
......@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20150728120436) do
ActiveRecord::Schema.define(version: 20150817085601) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
......@@ -85,6 +85,7 @@ ActiveRecord::Schema.define(version: 20150728120436) do
t.string "amount_unit"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.text "description"
end
create_table "users", force: :cascade do |t|
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment