LOGIN / SIGN UP

/ db / migrate / 20075317215301_create_commits.rb

No file history, only one commit
20075317215301_create_commits.rb
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
class CreateCommits < ActiveRecord::Migration
def self.up
create_table :commits do |t|
t.column 'repository_id', :integer
t.column 'user_id', :integer
t.column 'author', :string
t.column 'email', :string
t.column 'branch', :string
t.column 'title', :string
t.column 'body', :text
t.column 'revision', :string
t.column 'commit_next_id', :integer
t.column 'commit_prev_id', :integer
t.column 'commit_next_branch_id', :integer
t.column 'commit_prev_branch_id', :integer
t.column 'type', :string
# Automatic timestamping
t.column 'created_at', :datetime
end

add_index('commits', 'type')
end

def self.down
drop_table :commits
end
end