mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-27 10:14:17 +08:00
17 lines
507 B
Ruby
17 lines
507 B
Ruby
class CreateSampleCustomFields < ActiveRecord::Migration[4.2]
|
|
def change
|
|
create_table :sample_custom_fields do |t|
|
|
t.string :value, null: false
|
|
|
|
t.integer :custom_field_id, null: false
|
|
t.integer :sample_id, null: :false
|
|
|
|
t.timestamps null: false
|
|
end
|
|
add_foreign_key :sample_custom_fields, :custom_fields
|
|
add_foreign_key :sample_custom_fields, :samples
|
|
|
|
add_index :sample_custom_fields, :custom_field_id
|
|
add_index :sample_custom_fields, :sample_id
|
|
end
|
|
end
|