scinote-web/db/migrate/20151119141714_create_asset_text_data.rb
2017-06-30 10:23:28 +02:00

11 lines
333 B
Ruby

class CreateAssetTextData < ActiveRecord::Migration[4.2]
def change
create_table :asset_text_data do |t|
t.text :data, null: false
t.integer :asset_id, null: false
t.timestamps null: false
end
add_foreign_key :asset_text_data, :assets
add_index :asset_text_data, :asset_id, unique: true
end
end