diff options
-rw-r--r-- | app/models/event.rb | 9 | ||||
-rw-r--r-- | app/models/issue.rb | 25 | ||||
-rw-r--r-- | app/models/key.rb | 10 | ||||
-rw-r--r-- | app/models/merge_request.rb | 18 | ||||
-rw-r--r-- | app/models/milestone.rb | 14 | ||||
-rw-r--r-- | app/models/note.rb | 10 | ||||
-rw-r--r-- | app/models/project.rb | 18 | ||||
-rw-r--r-- | app/models/protected_branch.rb | 4 | ||||
-rw-r--r-- | app/models/snippet.rb | 10 | ||||
-rw-r--r-- | app/models/user.rb | 18 | ||||
-rw-r--r-- | app/models/users_project.rb | 12 | ||||
-rw-r--r-- | app/models/web_hook.rb | 8 | ||||
-rw-r--r-- | app/models/wiki.rb | 6 | ||||
-rw-r--r-- | spec/models/event_spec.rb | 9 | ||||
-rw-r--r-- | spec/models/issue_spec.rb | 24 | ||||
-rw-r--r-- | spec/models/key_spec.rb | 10 | ||||
-rw-r--r-- | spec/models/merge_request_spec.rb | 18 | ||||
-rw-r--r-- | spec/models/milestone_spec.rb | 14 | ||||
-rw-r--r-- | spec/models/note_spec.rb | 10 | ||||
-rw-r--r-- | spec/models/project_spec.rb | 18 | ||||
-rw-r--r-- | spec/models/protected_branch_spec.rb | 4 | ||||
-rw-r--r-- | spec/models/snippet_spec.rb | 10 | ||||
-rw-r--r-- | spec/models/user_spec.rb | 18 | ||||
-rw-r--r-- | spec/models/users_project_spec.rb | 12 | ||||
-rw-r--r-- | spec/models/web_hook_spec.rb | 8 | ||||
-rw-r--r-- | spec/models/wiki_spec.rb | 15 |
26 files changed, 190 insertions, 142 deletions
diff --git a/app/models/event.rb b/app/models/event.rb index 3f1ff3e553e..dc7dfa16dd5 100644 --- a/app/models/event.rb +++ b/app/models/event.rb @@ -110,14 +110,15 @@ end # # Table name: events # -# id :integer not null, primary key +# id :integer(4) not null, primary key # target_type :string(255) -# target_id :integer +# target_id :integer(4) # title :string(255) # data :text -# project_id :integer +# project_id :integer(4) # created_at :datetime not null # updated_at :datetime not null -# action :integer +# action :integer(4) +# author_id :integer(4) # diff --git a/app/models/issue.rb b/app/models/issue.rb index 844d418b1e0..fa2aa2f401d 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -72,17 +72,18 @@ end # # Table name: issues # -# id :integer not null, primary key -# title :string(255) -# description :text -# assignee_id :integer -# author_id :integer -# project_id :integer -# created_at :datetime -# updated_at :datetime -# closed :boolean default(FALSE), not null -# position :integer default(0) -# critical :boolean default(FALSE), not null -# branch_name :string(255) +# id :integer(4) not null, primary key +# title :string(255) +# assignee_id :integer(4) +# author_id :integer(4) +# project_id :integer(4) +# created_at :datetime not null +# updated_at :datetime not null +# closed :boolean(1) default(FALSE), not null +# position :integer(4) default(0) +# critical :boolean(1) default(FALSE), not null +# branch_name :string(255) +# description :text +# milestone_id :integer(4) # diff --git a/app/models/key.rb b/app/models/key.rb index 2b05ef55dd8..6b90b315d82 100644 --- a/app/models/key.rb +++ b/app/models/key.rb @@ -55,13 +55,13 @@ end # # Table name: keys # -# id :integer not null, primary key -# user_id :integer -# created_at :datetime -# updated_at :datetime +# id :integer(4) not null, primary key +# user_id :integer(4) +# created_at :datetime not null +# updated_at :datetime not null # key :text # title :string(255) # identifier :string(255) -# project_id :integer +# project_id :integer(4) # diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb index 12365b03059..19999afc46f 100644 --- a/app/models/merge_request.rb +++ b/app/models/merge_request.rb @@ -198,15 +198,19 @@ end # # Table name: merge_requests # -# id :integer not null, primary key +# id :integer(4) not null, primary key # target_branch :string(255) not null # source_branch :string(255) not null -# project_id :integer not null -# author_id :integer -# assignee_id :integer +# project_id :integer(4) not null +# author_id :integer(4) +# assignee_id :integer(4) # title :string(255) -# closed :boolean default(FALSE), not null -# created_at :datetime -# updated_at :datetime +# closed :boolean(1) default(FALSE), not null +# created_at :datetime not null +# updated_at :datetime not null +# st_commits :text(2147483647 +# st_diffs :text(2147483647 +# merged :boolean(1) default(FALSE), not null +# state :integer(4) default(1), not null # diff --git a/app/models/milestone.rb b/app/models/milestone.rb index 733c6a86803..7fdfe29edc8 100644 --- a/app/models/milestone.rb +++ b/app/models/milestone.rb @@ -1,3 +1,17 @@ +# == Schema Information +# +# Table name: milestones +# +# id :integer(4) not null, primary key +# title :string(255) not null +# project_id :integer(4) not null +# description :text +# due_date :date +# closed :boolean(1) default(FALSE), not null +# created_at :datetime not null +# updated_at :datetime not null +# + class Milestone < ActiveRecord::Base belongs_to :project has_many :issues diff --git a/app/models/note.rb b/app/models/note.rb index aa034ef483e..8a26cd05b44 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -110,14 +110,14 @@ end # # Table name: notes # -# id :integer not null, primary key +# id :integer(4) not null, primary key # note :text # noteable_id :string(255) # noteable_type :string(255) -# author_id :integer -# created_at :datetime -# updated_at :datetime -# project_id :integer +# author_id :integer(4) +# created_at :datetime not null +# updated_at :datetime not null +# project_id :integer(4) # attachment :string(255) # line_code :string(255) # diff --git a/app/models/project.rb b/app/models/project.rb index 2e4b12e9990..9a4da1973de 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -161,19 +161,19 @@ end # # Table name: projects # -# id :integer not null, primary key +# id :integer(4) not null, primary key # name :string(255) # path :string(255) # description :text -# created_at :datetime -# updated_at :datetime -# private_flag :boolean default(TRUE), not null +# created_at :datetime not null +# updated_at :datetime not null +# private_flag :boolean(1) default(TRUE), not null # code :string(255) -# owner_id :integer +# owner_id :integer(4) # default_branch :string(255) default("master"), not null -# issues_enabled :boolean default(TRUE), not null -# wall_enabled :boolean default(TRUE), not null -# merge_requests_enabled :boolean default(TRUE), not null -# wiki_enabled :boolean default(TRUE), not null +# issues_enabled :boolean(1) default(TRUE), not null +# wall_enabled :boolean(1) default(TRUE), not null +# merge_requests_enabled :boolean(1) default(TRUE), not null +# wiki_enabled :boolean(1) default(TRUE), not null # diff --git a/app/models/protected_branch.rb b/app/models/protected_branch.rb index e24412b245f..4da1432c1a9 100644 --- a/app/models/protected_branch.rb +++ b/app/models/protected_branch.rb @@ -18,8 +18,8 @@ end # # Table name: protected_branches # -# id :integer not null, primary key -# project_id :integer not null +# id :integer(4) not null, primary key +# project_id :integer(4) not null # name :string(255) not null # created_at :datetime not null # updated_at :datetime not null diff --git a/app/models/snippet.rb b/app/models/snippet.rb index 17d23418556..e5f04bb228b 100644 --- a/app/models/snippet.rb +++ b/app/models/snippet.rb @@ -62,13 +62,13 @@ end # # Table name: snippets # -# id :integer not null, primary key +# id :integer(4) not null, primary key # title :string(255) # content :text -# author_id :integer not null -# project_id :integer not null -# created_at :datetime -# updated_at :datetime +# author_id :integer(4) not null +# project_id :integer(4) not null +# created_at :datetime not null +# updated_at :datetime not null # file_name :string(255) # expires_at :datetime # diff --git a/app/models/user.rb b/app/models/user.rb index 69d5ec71e68..39aea3e87c8 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -92,25 +92,29 @@ end # # Table name: users # -# id :integer not null, primary key +# id :integer(4) not null, primary key # email :string(255) default(""), not null # encrypted_password :string(128) default(""), not null # reset_password_token :string(255) # reset_password_sent_at :datetime # remember_created_at :datetime -# sign_in_count :integer default(0) +# sign_in_count :integer(4) default(0) # current_sign_in_at :datetime # last_sign_in_at :datetime # current_sign_in_ip :string(255) # last_sign_in_ip :string(255) -# created_at :datetime -# updated_at :datetime +# created_at :datetime not null +# updated_at :datetime not null # name :string(255) -# admin :boolean default(FALSE), not null -# projects_limit :integer default(10) +# admin :boolean(1) default(FALSE), not null +# projects_limit :integer(4) default(10) # skype :string(255) default(""), not null # linkedin :string(255) default(""), not null # twitter :string(255) default(""), not null # authentication_token :string(255) -# dark_scheme :boolean default(FALSE), not null +# dark_scheme :boolean(1) default(FALSE), not null +# theme_id :integer(4) default(1), not null +# bio :string(255) +# blocked :boolean(1) default(FALSE), not null # + diff --git a/app/models/users_project.rb b/app/models/users_project.rb index 808ed64ca4c..6ba72370931 100644 --- a/app/models/users_project.rb +++ b/app/models/users_project.rb @@ -75,11 +75,11 @@ end # # Table name: users_projects # -# id :integer not null, primary key -# user_id :integer not null -# project_id :integer not null -# created_at :datetime -# updated_at :datetime -# project_access :integer default(0), not null +# id :integer(4) not null, primary key +# user_id :integer(4) not null +# project_id :integer(4) not null +# created_at :datetime not null +# updated_at :datetime not null +# project_access :integer(4) default(0), not null # diff --git a/app/models/web_hook.rb b/app/models/web_hook.rb index b0b1e0bd64a..26288476a6c 100644 --- a/app/models/web_hook.rb +++ b/app/models/web_hook.rb @@ -22,10 +22,10 @@ end # # Table name: web_hooks # -# id :integer not null, primary key +# id :integer(4) not null, primary key # url :string(255) -# project_id :integer -# created_at :datetime -# updated_at :datetime +# project_id :integer(4) +# created_at :datetime not null +# updated_at :datetime not null # diff --git a/app/models/wiki.rb b/app/models/wiki.rb index 3315488cfe1..ecc46fb4efb 100644 --- a/app/models/wiki.rb +++ b/app/models/wiki.rb @@ -34,13 +34,13 @@ end # # Table name: wikis # -# id :integer not null, primary key +# id :integer(4) not null, primary key # title :string(255) # content :text -# project_id :integer +# project_id :integer(4) # created_at :datetime not null # updated_at :datetime not null # slug :string(255) -# user_id :integer +# user_id :integer(4) # diff --git a/spec/models/event_spec.rb b/spec/models/event_spec.rb index 04604dd7b54..a295e2860cc 100644 --- a/spec/models/event_spec.rb +++ b/spec/models/event_spec.rb @@ -2,15 +2,16 @@ # # Table name: events # -# id :integer not null, primary key +# id :integer(4) not null, primary key # target_type :string(255) -# target_id :integer +# target_id :integer(4) # title :string(255) # data :text -# project_id :integer +# project_id :integer(4) # created_at :datetime not null # updated_at :datetime not null -# action :integer +# action :integer(4) +# author_id :integer(4) # require 'spec_helper' diff --git a/spec/models/issue_spec.rb b/spec/models/issue_spec.rb index fd3af62d74d..486b9f656c8 100644 --- a/spec/models/issue_spec.rb +++ b/spec/models/issue_spec.rb @@ -112,16 +112,18 @@ end # # Table name: issues # -# id :integer not null, primary key -# title :string(255) -# assignee_id :integer -# author_id :integer -# project_id :integer -# created_at :datetime -# updated_at :datetime -# closed :boolean default(FALSE), not null -# position :integer default(0) -# critical :boolean default(FALSE), not null -# branch_name :string(255) +# id :integer(4) not null, primary key +# title :string(255) +# assignee_id :integer(4) +# author_id :integer(4) +# project_id :integer(4) +# created_at :datetime not null +# updated_at :datetime not null +# closed :boolean(1) default(FALSE), not null +# position :integer(4) default(0) +# critical :boolean(1) default(FALSE), not null +# branch_name :string(255) +# description :text +# milestone_id :integer(4) # diff --git a/spec/models/key_spec.rb b/spec/models/key_spec.rb index b24f22cad96..0f9b31778df 100644 --- a/spec/models/key_spec.rb +++ b/spec/models/key_spec.rb @@ -53,13 +53,13 @@ end # # Table name: keys # -# id :integer not null, primary key -# user_id :integer -# created_at :datetime -# updated_at :datetime +# id :integer(4) not null, primary key +# user_id :integer(4) +# created_at :datetime not null +# updated_at :datetime not null # key :text # title :string(255) # identifier :string(255) -# project_id :integer +# project_id :integer(4) # diff --git a/spec/models/merge_request_spec.rb b/spec/models/merge_request_spec.rb index 63996e2e517..8d750bef5a5 100644 --- a/spec/models/merge_request_spec.rb +++ b/spec/models/merge_request_spec.rb @@ -62,15 +62,19 @@ end # # Table name: merge_requests # -# id :integer not null, primary key +# id :integer(4) not null, primary key # target_branch :string(255) not null # source_branch :string(255) not null -# project_id :integer not null -# author_id :integer -# assignee_id :integer +# project_id :integer(4) not null +# author_id :integer(4) +# assignee_id :integer(4) # title :string(255) -# closed :boolean default(FALSE), not null -# created_at :datetime -# updated_at :datetime +# closed :boolean(1) default(FALSE), not null +# created_at :datetime not null +# updated_at :datetime not null +# st_commits :text(2147483647 +# st_diffs :text(2147483647 +# merged :boolean(1) default(FALSE), not null +# state :integer(4) default(1), not null # diff --git a/spec/models/milestone_spec.rb b/spec/models/milestone_spec.rb index ba117986658..bb71ca990f0 100644 --- a/spec/models/milestone_spec.rb +++ b/spec/models/milestone_spec.rb @@ -1,3 +1,17 @@ +# == Schema Information +# +# Table name: milestones +# +# id :integer(4) not null, primary key +# title :string(255) not null +# project_id :integer(4) not null +# description :text +# due_date :date +# closed :boolean(1) default(FALSE), not null +# created_at :datetime not null +# updated_at :datetime not null +# + require 'spec_helper' describe Milestone do diff --git a/spec/models/note_spec.rb b/spec/models/note_spec.rb index af6ee9b889b..f2dfcabcc87 100644 --- a/spec/models/note_spec.rb +++ b/spec/models/note_spec.rb @@ -139,14 +139,14 @@ end # # Table name: notes # -# id :integer not null, primary key +# id :integer(4) not null, primary key # note :text # noteable_id :string(255) # noteable_type :string(255) -# author_id :integer -# created_at :datetime -# updated_at :datetime -# project_id :integer +# author_id :integer(4) +# created_at :datetime not null +# updated_at :datetime not null +# project_id :integer(4) # attachment :string(255) # line_code :string(255) # diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index d28668b2445..ab1baf0e505 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -206,19 +206,19 @@ end # # Table name: projects # -# id :integer not null, primary key +# id :integer(4) not null, primary key # name :string(255) # path :string(255) # description :text -# created_at :datetime -# updated_at :datetime -# private_flag :boolean default(TRUE), not null +# created_at :datetime not null +# updated_at :datetime not null +# private_flag :boolean(1) default(TRUE), not null # code :string(255) -# owner_id :integer +# owner_id :integer(4) # default_branch :string(255) default("master"), not null -# issues_enabled :boolean default(TRUE), not null -# wall_enabled :boolean default(TRUE), not null -# merge_requests_enabled :boolean default(TRUE), not null -# wiki_enabled :boolean default(TRUE), not null +# issues_enabled :boolean(1) default(TRUE), not null +# wall_enabled :boolean(1) default(TRUE), not null +# merge_requests_enabled :boolean(1) default(TRUE), not null +# wiki_enabled :boolean(1) default(TRUE), not null # diff --git a/spec/models/protected_branch_spec.rb b/spec/models/protected_branch_spec.rb index 024b45f2cab..becc1be4d76 100644 --- a/spec/models/protected_branch_spec.rb +++ b/spec/models/protected_branch_spec.rb @@ -2,8 +2,8 @@ # # Table name: protected_branches # -# id :integer not null, primary key -# project_id :integer not null +# id :integer(4) not null, primary key +# project_id :integer(4) not null # name :string(255) not null # created_at :datetime not null # updated_at :datetime not null diff --git a/spec/models/snippet_spec.rb b/spec/models/snippet_spec.rb index 037287a9928..9b4aaa13f74 100644 --- a/spec/models/snippet_spec.rb +++ b/spec/models/snippet_spec.rb @@ -18,13 +18,13 @@ end # # Table name: snippets # -# id :integer not null, primary key +# id :integer(4) not null, primary key # title :string(255) # content :text -# author_id :integer not null -# project_id :integer not null -# created_at :datetime -# updated_at :datetime +# author_id :integer(4) not null +# project_id :integer(4) not null +# created_at :datetime not null +# updated_at :datetime not null # file_name :string(255) # expires_at :datetime # diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 6fe96284eec..c2721dd1d6c 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -46,25 +46,29 @@ end # # Table name: users # -# id :integer not null, primary key +# id :integer(4) not null, primary key # email :string(255) default(""), not null # encrypted_password :string(128) default(""), not null # reset_password_token :string(255) # reset_password_sent_at :datetime # remember_created_at :datetime -# sign_in_count :integer default(0) +# sign_in_count :integer(4) default(0) # current_sign_in_at :datetime # last_sign_in_at :datetime # current_sign_in_ip :string(255) # last_sign_in_ip :string(255) -# created_at :datetime -# updated_at :datetime +# created_at :datetime not null +# updated_at :datetime not null # name :string(255) -# admin :boolean default(FALSE), not null -# projects_limit :integer default(10) +# admin :boolean(1) default(FALSE), not null +# projects_limit :integer(4) default(10) # skype :string(255) default(""), not null # linkedin :string(255) default(""), not null # twitter :string(255) default(""), not null # authentication_token :string(255) -# dark_scheme :boolean default(FALSE), not null +# dark_scheme :boolean(1) default(FALSE), not null +# theme_id :integer(4) default(1), not null +# bio :string(255) +# blocked :boolean(1) default(FALSE), not null # + diff --git a/spec/models/users_project_spec.rb b/spec/models/users_project_spec.rb index 85bc4d346b0..87fbfbf2a8c 100644 --- a/spec/models/users_project_spec.rb +++ b/spec/models/users_project_spec.rb @@ -20,11 +20,11 @@ end # # Table name: users_projects # -# id :integer not null, primary key -# user_id :integer not null -# project_id :integer not null -# created_at :datetime -# updated_at :datetime -# project_access :integer default(0), not null +# id :integer(4) not null, primary key +# user_id :integer(4) not null +# project_id :integer(4) not null +# created_at :datetime not null +# updated_at :datetime not null +# project_access :integer(4) default(0), not null # diff --git a/spec/models/web_hook_spec.rb b/spec/models/web_hook_spec.rb index 309bfc0fd53..9971bd5819d 100644 --- a/spec/models/web_hook_spec.rb +++ b/spec/models/web_hook_spec.rb @@ -56,10 +56,10 @@ end # # Table name: web_hooks # -# id :integer not null, primary key +# id :integer(4) not null, primary key # url :string(255) -# project_id :integer -# created_at :datetime -# updated_at :datetime +# project_id :integer(4) +# created_at :datetime not null +# updated_at :datetime not null # diff --git a/spec/models/wiki_spec.rb b/spec/models/wiki_spec.rb index 05dbc972350..892d0e8fe17 100644 --- a/spec/models/wiki_spec.rb +++ b/spec/models/wiki_spec.rb @@ -16,16 +16,15 @@ describe Wiki do end # == Schema Information # -# Table name: snippets +# Table name: wikis # -# id :integer not null, primary key +# id :integer(4) not null, primary key # title :string(255) # content :text -# author_id :integer not null -# project_id :integer not null -# created_at :datetime -# updated_at :datetime -# file_name :string(255) -# expires_at :datetime +# project_id :integer(4) +# created_at :datetime not null +# updated_at :datetime not null +# slug :string(255) +# user_id :integer(4) # |