Cross Reference:
xref
: /
ontohub
/
db
/
migrate
/
20150128133702_create_commits.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
20150128133702_create_commits.rb revision f218a095cf4ca58d9ae4407675c82ff56bd27267
class
CreateCommits
<
ActiveRecord
::
Migration
def
change
create_table
:
commits
do
|t|
t.string
:
commit_oid
,
limit
:
40
,
null
:
false
t.text
:
committer
t.text
:
author
t.datetime
:
author_date
t.datetime
:
commit_date
t.references
:
repository
,
null
:
false
t.timestamps
end
add_index
:
commits
, :
commit_oid
add_index
:
commits
, :
author_date
add_index
:
commits
, :
commit_date
add_index
:
commits
, [:
repository_id
, :
commit_oid
],
unique
:
true
add_index
:
commits
, [:
repository_id
, :
id
],
unique
:
true
end
end