Cross Reference:
xref
: /
ontohub
/
db
/
migrate
/
20130924124044_add_tasks_to_ontologies.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
20130924124044_add_tasks_to_ontologies.rb revision 203159cca3f0cedf0b074655613eebafec4db98f
class
AddTasksToOntologies
<
ActiveRecord
::
Migration
def
change
create_table
:
tasks
do
|t|
t.string
:
name
, :
null
=>
false
t.string
:
description
t.timestamps
end
change_table
:
tasks
do
|t|
t.index
:
name
, :
unique
=>
true
end
change_table
:
ontologies
do
|t|
t.integer
:
task_id
t.index
:
task_id
t.foreign
_key
:
tasks
end
end
end