Cross Reference:
xref
: /
ontohub
/
db
/
migrate
/
20120307152347_create_entities.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
20120307152347_create_entities.rb revision cad2121a9e9a87317333b202956ce7478efcc257
class
CreateEntities
<
ActiveRecord
::
Migration
def
change
create_table
:
entities
do
|t|
t.references
:
ontology
, :
null
=>
false
t.string
:
kind
t.string
:
text
, :
null
=>
false
t.string
:
name
, :
null
=>
false
t.string
:
uri
t.string
:
range
t.timestamps
:
null
=>
false
end
change_table
:
entities
do
|t|
t.index
[:
ontology_id
, :
id
], :
unique
=>
true
t.index
[:
ontology_id
, :
text
], :
unique
=>
true
t.foreign
_key
:
ontologies
, :
dependent
=> :
delete
end
end
end