mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-28 19:24:10 +08:00
12 lines
329 B
Ruby
12 lines
329 B
Ruby
|
class CreateAssetTextData < ActiveRecord::Migration
|
||
|
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
|