Cross Reference:
xref
: /
ontohub
/
db
/
migrate
/
20120307143552_create_ontologies.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
20120307143552_create_ontologies.rb revision 3eedfb6dd90308259bcfeddaa2cc883c1219df76
class
CreateOntologies
<
ActiveRecord
::
Migration
def
change
create_table
:
ontologies
do
|t|
t.references
:
logic
t.references
:
owner
, :
polymorphic
=>
true
t.string
:
uri
, :
null
=>
false
t.string
:
state
, :
default
=>
'pending'
, :
null
=>
false
t.string
:
name
t.text
:
description
t.timestamps
:
null
=>
false
end
change_table
:
ontologies
do
|t|
t.index
:
logic_id
t.index
[:
owner_id
, :
owner_type
]
t.foreign
_key
:
logics
end
end
end