Commit 2a4359a572c123d117988487f9bb29f4ae176ceb
1 parent
a8870e87
Exists in
master
and in
4 other branches
annotate models
Showing
15 changed files
with
86 additions
and
57 deletions
Show diff stats
app/models/event.rb
| @@ -144,15 +144,15 @@ end | @@ -144,15 +144,15 @@ end | ||
| 144 | # | 144 | # |
| 145 | # Table name: events | 145 | # Table name: events |
| 146 | # | 146 | # |
| 147 | -# id :integer(4) not null, primary key | 147 | +# id :integer not null, primary key |
| 148 | # target_type :string(255) | 148 | # target_type :string(255) |
| 149 | -# target_id :integer(4) | 149 | +# target_id :integer |
| 150 | # title :string(255) | 150 | # title :string(255) |
| 151 | # data :text | 151 | # data :text |
| 152 | -# project_id :integer(4) | 152 | +# project_id :integer |
| 153 | # created_at :datetime not null | 153 | # created_at :datetime not null |
| 154 | # updated_at :datetime not null | 154 | # updated_at :datetime not null |
| 155 | -# action :integer(4) | ||
| 156 | -# author_id :integer(4) | 155 | +# action :integer |
| 156 | +# author_id :integer | ||
| 157 | # | 157 | # |
| 158 | 158 |
app/models/issue.rb
| @@ -36,18 +36,17 @@ end | @@ -36,18 +36,17 @@ end | ||
| 36 | # | 36 | # |
| 37 | # Table name: issues | 37 | # Table name: issues |
| 38 | # | 38 | # |
| 39 | -# id :integer(4) not null, primary key | 39 | +# id :integer not null, primary key |
| 40 | # title :string(255) | 40 | # title :string(255) |
| 41 | -# assignee_id :integer(4) | ||
| 42 | -# author_id :integer(4) | ||
| 43 | -# project_id :integer(4) | 41 | +# assignee_id :integer |
| 42 | +# author_id :integer | ||
| 43 | +# project_id :integer | ||
| 44 | # created_at :datetime not null | 44 | # created_at :datetime not null |
| 45 | # updated_at :datetime not null | 45 | # updated_at :datetime not null |
| 46 | -# closed :boolean(1) default(FALSE), not null | ||
| 47 | -# position :integer(4) default(0) | ||
| 48 | -# critical :boolean(1) default(FALSE), not null | 46 | +# closed :boolean default(FALSE), not null |
| 47 | +# position :integer default(0) | ||
| 49 | # branch_name :string(255) | 48 | # branch_name :string(255) |
| 50 | # description :text | 49 | # description :text |
| 51 | -# milestone_id :integer(4) | 50 | +# milestone_id :integer |
| 52 | # | 51 | # |
| 53 | 52 |
app/models/key.rb
| @@ -61,13 +61,13 @@ end | @@ -61,13 +61,13 @@ end | ||
| 61 | # | 61 | # |
| 62 | # Table name: keys | 62 | # Table name: keys |
| 63 | # | 63 | # |
| 64 | -# id :integer(4) not null, primary key | ||
| 65 | -# user_id :integer(4) | 64 | +# id :integer not null, primary key |
| 65 | +# user_id :integer | ||
| 66 | # created_at :datetime not null | 66 | # created_at :datetime not null |
| 67 | # updated_at :datetime not null | 67 | # updated_at :datetime not null |
| 68 | # key :text | 68 | # key :text |
| 69 | # title :string(255) | 69 | # title :string(255) |
| 70 | # identifier :string(255) | 70 | # identifier :string(255) |
| 71 | -# project_id :integer(4) | 71 | +# project_id :integer |
| 72 | # | 72 | # |
| 73 | 73 |
app/models/merge_request.rb
| @@ -191,19 +191,19 @@ end | @@ -191,19 +191,19 @@ end | ||
| 191 | # | 191 | # |
| 192 | # Table name: merge_requests | 192 | # Table name: merge_requests |
| 193 | # | 193 | # |
| 194 | -# id :integer(4) not null, primary key | 194 | +# id :integer not null, primary key |
| 195 | # target_branch :string(255) not null | 195 | # target_branch :string(255) not null |
| 196 | # source_branch :string(255) not null | 196 | # source_branch :string(255) not null |
| 197 | -# project_id :integer(4) not null | ||
| 198 | -# author_id :integer(4) | ||
| 199 | -# assignee_id :integer(4) | 197 | +# project_id :integer not null |
| 198 | +# author_id :integer | ||
| 199 | +# assignee_id :integer | ||
| 200 | # title :string(255) | 200 | # title :string(255) |
| 201 | -# closed :boolean(1) default(FALSE), not null | 201 | +# closed :boolean default(FALSE), not null |
| 202 | # created_at :datetime not null | 202 | # created_at :datetime not null |
| 203 | # updated_at :datetime not null | 203 | # updated_at :datetime not null |
| 204 | # st_commits :text(2147483647 | 204 | # st_commits :text(2147483647 |
| 205 | # st_diffs :text(2147483647 | 205 | # st_diffs :text(2147483647 |
| 206 | -# merged :boolean(1) default(FALSE), not null | ||
| 207 | -# state :integer(4) default(1), not null | 206 | +# merged :boolean default(FALSE), not null |
| 207 | +# state :integer default(1), not null | ||
| 208 | # | 208 | # |
| 209 | 209 |
app/models/milestone.rb
| @@ -2,12 +2,12 @@ | @@ -2,12 +2,12 @@ | ||
| 2 | # | 2 | # |
| 3 | # Table name: milestones | 3 | # Table name: milestones |
| 4 | # | 4 | # |
| 5 | -# id :integer(4) not null, primary key | 5 | +# id :integer not null, primary key |
| 6 | # title :string(255) not null | 6 | # title :string(255) not null |
| 7 | -# project_id :integer(4) not null | 7 | +# project_id :integer not null |
| 8 | # description :text | 8 | # description :text |
| 9 | # due_date :date | 9 | # due_date :date |
| 10 | -# closed :boolean(1) default(FALSE), not null | 10 | +# closed :boolean default(FALSE), not null |
| 11 | # created_at :datetime not null | 11 | # created_at :datetime not null |
| 12 | # updated_at :datetime not null | 12 | # updated_at :datetime not null |
| 13 | # | 13 | # |
app/models/note.rb
| @@ -118,14 +118,14 @@ end | @@ -118,14 +118,14 @@ end | ||
| 118 | # | 118 | # |
| 119 | # Table name: notes | 119 | # Table name: notes |
| 120 | # | 120 | # |
| 121 | -# id :integer(4) not null, primary key | 121 | +# id :integer not null, primary key |
| 122 | # note :text | 122 | # note :text |
| 123 | # noteable_id :string(255) | 123 | # noteable_id :string(255) |
| 124 | # noteable_type :string(255) | 124 | # noteable_type :string(255) |
| 125 | -# author_id :integer(4) | 125 | +# author_id :integer |
| 126 | # created_at :datetime not null | 126 | # created_at :datetime not null |
| 127 | # updated_at :datetime not null | 127 | # updated_at :datetime not null |
| 128 | -# project_id :integer(4) | 128 | +# project_id :integer |
| 129 | # attachment :string(255) | 129 | # attachment :string(255) |
| 130 | # line_code :string(255) | 130 | # line_code :string(255) |
| 131 | # | 131 | # |
app/models/project.rb
| @@ -182,19 +182,19 @@ end | @@ -182,19 +182,19 @@ end | ||
| 182 | # | 182 | # |
| 183 | # Table name: projects | 183 | # Table name: projects |
| 184 | # | 184 | # |
| 185 | -# id :integer(4) not null, primary key | 185 | +# id :integer not null, primary key |
| 186 | # name :string(255) | 186 | # name :string(255) |
| 187 | # path :string(255) | 187 | # path :string(255) |
| 188 | # description :text | 188 | # description :text |
| 189 | # created_at :datetime not null | 189 | # created_at :datetime not null |
| 190 | # updated_at :datetime not null | 190 | # updated_at :datetime not null |
| 191 | -# private_flag :boolean(1) default(TRUE), not null | 191 | +# private_flag :boolean default(TRUE), not null |
| 192 | # code :string(255) | 192 | # code :string(255) |
| 193 | -# owner_id :integer(4) | 193 | +# owner_id :integer |
| 194 | # default_branch :string(255) | 194 | # default_branch :string(255) |
| 195 | -# issues_enabled :boolean(1) default(TRUE), not null | ||
| 196 | -# wall_enabled :boolean(1) default(TRUE), not null | ||
| 197 | -# merge_requests_enabled :boolean(1) default(TRUE), not null | ||
| 198 | -# wiki_enabled :boolean(1) default(TRUE), not null | 195 | +# issues_enabled :boolean default(TRUE), not null |
| 196 | +# wall_enabled :boolean default(TRUE), not null | ||
| 197 | +# merge_requests_enabled :boolean default(TRUE), not null | ||
| 198 | +# wiki_enabled :boolean default(TRUE), not null | ||
| 199 | # | 199 | # |
| 200 | 200 |
app/models/project_hook.rb
| 1 | +# == Schema Information | ||
| 2 | +# | ||
| 3 | +# Table name: web_hooks | ||
| 4 | +# | ||
| 5 | +# id :integer not null, primary key | ||
| 6 | +# url :string(255) | ||
| 7 | +# project_id :integer | ||
| 8 | +# created_at :datetime not null | ||
| 9 | +# updated_at :datetime not null | ||
| 10 | +# type :string(255) default("ProjectHook") | ||
| 11 | +# | ||
| 12 | + | ||
| 1 | class ProjectHook < WebHook | 13 | class ProjectHook < WebHook |
| 2 | belongs_to :project | 14 | belongs_to :project |
| 3 | end | 15 | end |
app/models/protected_branch.rb
| @@ -22,8 +22,8 @@ end | @@ -22,8 +22,8 @@ end | ||
| 22 | # | 22 | # |
| 23 | # Table name: protected_branches | 23 | # Table name: protected_branches |
| 24 | # | 24 | # |
| 25 | -# id :integer(4) not null, primary key | ||
| 26 | -# project_id :integer(4) not null | 25 | +# id :integer not null, primary key |
| 26 | +# project_id :integer not null | ||
| 27 | # name :string(255) not null | 27 | # name :string(255) not null |
| 28 | # created_at :datetime not null | 28 | # created_at :datetime not null |
| 29 | # updated_at :datetime not null | 29 | # updated_at :datetime not null |
app/models/snippet.rb
| @@ -63,11 +63,11 @@ end | @@ -63,11 +63,11 @@ end | ||
| 63 | # | 63 | # |
| 64 | # Table name: snippets | 64 | # Table name: snippets |
| 65 | # | 65 | # |
| 66 | -# id :integer(4) not null, primary key | 66 | +# id :integer not null, primary key |
| 67 | # title :string(255) | 67 | # title :string(255) |
| 68 | # content :text | 68 | # content :text |
| 69 | -# author_id :integer(4) not null | ||
| 70 | -# project_id :integer(4) not null | 69 | +# author_id :integer not null |
| 70 | +# project_id :integer not null | ||
| 71 | # created_at :datetime not null | 71 | # created_at :datetime not null |
| 72 | # updated_at :datetime not null | 72 | # updated_at :datetime not null |
| 73 | # file_name :string(255) | 73 | # file_name :string(255) |
app/models/system_hook.rb
| 1 | +# == Schema Information | ||
| 2 | +# | ||
| 3 | +# Table name: web_hooks | ||
| 4 | +# | ||
| 5 | +# id :integer not null, primary key | ||
| 6 | +# url :string(255) | ||
| 7 | +# project_id :integer | ||
| 8 | +# created_at :datetime not null | ||
| 9 | +# updated_at :datetime not null | ||
| 10 | +# type :string(255) default("ProjectHook") | ||
| 11 | +# | ||
| 12 | + | ||
| 1 | class SystemHook < WebHook | 13 | class SystemHook < WebHook |
| 2 | 14 | ||
| 3 | def async_execute(data) | 15 | def async_execute(data) |
app/models/user.rb
| @@ -111,13 +111,13 @@ end | @@ -111,13 +111,13 @@ end | ||
| 111 | # | 111 | # |
| 112 | # Table name: users | 112 | # Table name: users |
| 113 | # | 113 | # |
| 114 | -# id :integer(4) not null, primary key | 114 | +# id :integer not null, primary key |
| 115 | # email :string(255) default(""), not null | 115 | # email :string(255) default(""), not null |
| 116 | # encrypted_password :string(128) default(""), not null | 116 | # encrypted_password :string(128) default(""), not null |
| 117 | # reset_password_token :string(255) | 117 | # reset_password_token :string(255) |
| 118 | # reset_password_sent_at :datetime | 118 | # reset_password_sent_at :datetime |
| 119 | # remember_created_at :datetime | 119 | # remember_created_at :datetime |
| 120 | -# sign_in_count :integer(4) default(0) | 120 | +# sign_in_count :integer default(0) |
| 121 | # current_sign_in_at :datetime | 121 | # current_sign_in_at :datetime |
| 122 | # last_sign_in_at :datetime | 122 | # last_sign_in_at :datetime |
| 123 | # current_sign_in_ip :string(255) | 123 | # current_sign_in_ip :string(255) |
| @@ -125,14 +125,19 @@ end | @@ -125,14 +125,19 @@ end | ||
| 125 | # created_at :datetime not null | 125 | # created_at :datetime not null |
| 126 | # updated_at :datetime not null | 126 | # updated_at :datetime not null |
| 127 | # name :string(255) | 127 | # name :string(255) |
| 128 | -# admin :boolean(1) default(FALSE), not null | ||
| 129 | -# projects_limit :integer(4) default(10) | 128 | +# admin :boolean default(FALSE), not null |
| 129 | +# projects_limit :integer default(10) | ||
| 130 | # skype :string(255) default(""), not null | 130 | # skype :string(255) default(""), not null |
| 131 | # linkedin :string(255) default(""), not null | 131 | # linkedin :string(255) default(""), not null |
| 132 | # twitter :string(255) default(""), not null | 132 | # twitter :string(255) default(""), not null |
| 133 | # authentication_token :string(255) | 133 | # authentication_token :string(255) |
| 134 | -# dark_scheme :boolean(1) default(FALSE), not null | ||
| 135 | -# theme_id :integer(4) default(1), not null | 134 | +# dark_scheme :boolean default(FALSE), not null |
| 135 | +# theme_id :integer default(1), not null | ||
| 136 | # bio :string(255) | 136 | # bio :string(255) |
| 137 | -# blocked :boolean(1) default(FALSE), not null | 137 | +# blocked :boolean default(FALSE), not null |
| 138 | +# failed_attempts :integer default(0) | ||
| 139 | +# locked_at :datetime | ||
| 140 | +# extern_uid :string(255) | ||
| 141 | +# provider :string(255) | ||
| 138 | # | 142 | # |
| 143 | + |
app/models/users_project.rb
| @@ -92,11 +92,11 @@ end | @@ -92,11 +92,11 @@ end | ||
| 92 | # | 92 | # |
| 93 | # Table name: users_projects | 93 | # Table name: users_projects |
| 94 | # | 94 | # |
| 95 | -# id :integer(4) not null, primary key | ||
| 96 | -# user_id :integer(4) not null | ||
| 97 | -# project_id :integer(4) not null | 95 | +# id :integer not null, primary key |
| 96 | +# user_id :integer not null | ||
| 97 | +# project_id :integer not null | ||
| 98 | # created_at :datetime not null | 98 | # created_at :datetime not null |
| 99 | # updated_at :datetime not null | 99 | # updated_at :datetime not null |
| 100 | -# project_access :integer(4) default(0), not null | 100 | +# project_access :integer default(0), not null |
| 101 | # | 101 | # |
| 102 | 102 |
app/models/web_hook.rb
| @@ -30,10 +30,11 @@ end | @@ -30,10 +30,11 @@ end | ||
| 30 | # | 30 | # |
| 31 | # Table name: web_hooks | 31 | # Table name: web_hooks |
| 32 | # | 32 | # |
| 33 | -# id :integer(4) not null, primary key | 33 | +# id :integer not null, primary key |
| 34 | # url :string(255) | 34 | # url :string(255) |
| 35 | -# project_id :integer(4) | 35 | +# project_id :integer |
| 36 | # created_at :datetime not null | 36 | # created_at :datetime not null |
| 37 | # updated_at :datetime not null | 37 | # updated_at :datetime not null |
| 38 | +# type :string(255) default("ProjectHook") | ||
| 38 | # | 39 | # |
| 39 | 40 |
app/models/wiki.rb
| @@ -36,13 +36,13 @@ end | @@ -36,13 +36,13 @@ end | ||
| 36 | # | 36 | # |
| 37 | # Table name: wikis | 37 | # Table name: wikis |
| 38 | # | 38 | # |
| 39 | -# id :integer(4) not null, primary key | 39 | +# id :integer not null, primary key |
| 40 | # title :string(255) | 40 | # title :string(255) |
| 41 | # content :text | 41 | # content :text |
| 42 | -# project_id :integer(4) | 42 | +# project_id :integer |
| 43 | # created_at :datetime not null | 43 | # created_at :datetime not null |
| 44 | # updated_at :datetime not null | 44 | # updated_at :datetime not null |
| 45 | # slug :string(255) | 45 | # slug :string(255) |
| 46 | -# user_id :integer(4) | 46 | +# user_id :integer |
| 47 | # | 47 | # |
| 48 | 48 |