summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNihad Abbasov <narkoz.2008@gmail.com>2012-09-26 22:36:31 -0700
committerNihad Abbasov <narkoz.2008@gmail.com>2012-09-27 02:05:53 -0700
commit2a4359a572c123d117988487f9bb29f4ae176ceb (patch)
tree693f34b3dff465091a0e2c985af753ce28aae754
parenta8870e87e4cc8ce441032dc6aa3dfa6e1812090e (diff)
downloadgitlab-ce-2a4359a572c123d117988487f9bb29f4ae176ceb.tar.gz
annotate models
-rw-r--r--app/models/event.rb10
-rw-r--r--app/models/issue.rb15
-rw-r--r--app/models/key.rb6
-rw-r--r--app/models/merge_request.rb14
-rw-r--r--app/models/milestone.rb6
-rw-r--r--app/models/note.rb6
-rw-r--r--app/models/project.rb14
-rw-r--r--app/models/project_hook.rb12
-rw-r--r--app/models/protected_branch.rb4
-rw-r--r--app/models/snippet.rb6
-rw-r--r--app/models/system_hook.rb12
-rw-r--r--app/models/user.rb19
-rw-r--r--app/models/users_project.rb8
-rw-r--r--app/models/web_hook.rb5
-rw-r--r--app/models/wiki.rb6
15 files changed, 86 insertions, 57 deletions
diff --git a/app/models/event.rb b/app/models/event.rb
index 76e428adc76..e77afb98acb 100644
--- a/app/models/event.rb
+++ b/app/models/event.rb
@@ -144,15 +144,15 @@ end
#
# Table name: events
#
-# id :integer(4) not null, primary key
+# id :integer not null, primary key
# target_type :string(255)
-# target_id :integer(4)
+# target_id :integer
# title :string(255)
# data :text
-# project_id :integer(4)
+# project_id :integer
# created_at :datetime not null
# updated_at :datetime not null
-# action :integer(4)
-# author_id :integer(4)
+# action :integer
+# author_id :integer
#
diff --git a/app/models/issue.rb b/app/models/issue.rb
index e1181b97018..5e7616d6925 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -36,18 +36,17 @@ end
#
# Table name: issues
#
-# id :integer(4) not null, primary key
+# id :integer not null, primary key
# title :string(255)
-# assignee_id :integer(4)
-# author_id :integer(4)
-# project_id :integer(4)
+# assignee_id :integer
+# author_id :integer
+# project_id :integer
# 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
+# closed :boolean default(FALSE), not null
+# position :integer default(0)
# branch_name :string(255)
# description :text
-# milestone_id :integer(4)
+# milestone_id :integer
#
diff --git a/app/models/key.rb b/app/models/key.rb
index e23447e6aea..eadfcd85cd1 100644
--- a/app/models/key.rb
+++ b/app/models/key.rb
@@ -61,13 +61,13 @@ end
#
# Table name: keys
#
-# id :integer(4) not null, primary key
-# user_id :integer(4)
+# id :integer not null, primary key
+# user_id :integer
# created_at :datetime not null
# updated_at :datetime not null
# key :text
# title :string(255)
# identifier :string(255)
-# project_id :integer(4)
+# project_id :integer
#
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb
index 717fe296934..1e73276efd2 100644
--- a/app/models/merge_request.rb
+++ b/app/models/merge_request.rb
@@ -191,19 +191,19 @@ end
#
# Table name: merge_requests
#
-# id :integer(4) not null, primary key
+# id :integer not null, primary key
# target_branch :string(255) not null
# source_branch :string(255) not null
-# project_id :integer(4) not null
-# author_id :integer(4)
-# assignee_id :integer(4)
+# project_id :integer not null
+# author_id :integer
+# assignee_id :integer
# title :string(255)
-# closed :boolean(1) default(FALSE), not null
+# closed :boolean 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
+# merged :boolean default(FALSE), not null
+# state :integer default(1), not null
#
diff --git a/app/models/milestone.rb b/app/models/milestone.rb
index 65fa461f2e0..9014647c126 100644
--- a/app/models/milestone.rb
+++ b/app/models/milestone.rb
@@ -2,12 +2,12 @@
#
# Table name: milestones
#
-# id :integer(4) not null, primary key
+# id :integer not null, primary key
# title :string(255) not null
-# project_id :integer(4) not null
+# project_id :integer not null
# description :text
# due_date :date
-# closed :boolean(1) default(FALSE), not null
+# closed :boolean default(FALSE), not null
# created_at :datetime not null
# updated_at :datetime not null
#
diff --git a/app/models/note.rb b/app/models/note.rb
index 9ac77ef7823..849139701d4 100644
--- a/app/models/note.rb
+++ b/app/models/note.rb
@@ -118,14 +118,14 @@ end
#
# Table name: notes
#
-# id :integer(4) not null, primary key
+# id :integer not null, primary key
# note :text
# noteable_id :string(255)
# noteable_type :string(255)
-# author_id :integer(4)
+# author_id :integer
# created_at :datetime not null
# updated_at :datetime not null
-# project_id :integer(4)
+# project_id :integer
# attachment :string(255)
# line_code :string(255)
#
diff --git a/app/models/project.rb b/app/models/project.rb
index 7470bd95c88..39e2bb25ae3 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -182,19 +182,19 @@ end
#
# Table name: projects
#
-# id :integer(4) not null, primary key
+# id :integer not null, primary key
# name :string(255)
# path :string(255)
# description :text
# created_at :datetime not null
# updated_at :datetime not null
-# private_flag :boolean(1) default(TRUE), not null
+# private_flag :boolean default(TRUE), not null
# code :string(255)
-# owner_id :integer(4)
+# owner_id :integer
# default_branch :string(255)
-# 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
+# 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
#
diff --git a/app/models/project_hook.rb b/app/models/project_hook.rb
index 06388aaeb4c..e7a05d57f1c 100644
--- a/app/models/project_hook.rb
+++ b/app/models/project_hook.rb
@@ -1,3 +1,15 @@
+# == Schema Information
+#
+# Table name: web_hooks
+#
+# id :integer not null, primary key
+# url :string(255)
+# project_id :integer
+# created_at :datetime not null
+# updated_at :datetime not null
+# type :string(255) default("ProjectHook")
+#
+
class ProjectHook < WebHook
belongs_to :project
end
diff --git a/app/models/protected_branch.rb b/app/models/protected_branch.rb
index 4ea083c17e3..421828645c0 100644
--- a/app/models/protected_branch.rb
+++ b/app/models/protected_branch.rb
@@ -22,8 +22,8 @@ end
#
# Table name: protected_branches
#
-# id :integer(4) not null, primary key
-# project_id :integer(4) not null
+# id :integer not null, primary key
+# project_id :integer 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 bfd28684f20..10e376454b1 100644
--- a/app/models/snippet.rb
+++ b/app/models/snippet.rb
@@ -63,11 +63,11 @@ end
#
# Table name: snippets
#
-# id :integer(4) not null, primary key
+# id :integer not null, primary key
# title :string(255)
# content :text
-# author_id :integer(4) not null
-# project_id :integer(4) not null
+# author_id :integer not null
+# project_id :integer not null
# created_at :datetime not null
# updated_at :datetime not null
# file_name :string(255)
diff --git a/app/models/system_hook.rb b/app/models/system_hook.rb
index 8517d43a9de..89c69fce83d 100644
--- a/app/models/system_hook.rb
+++ b/app/models/system_hook.rb
@@ -1,3 +1,15 @@
+# == Schema Information
+#
+# Table name: web_hooks
+#
+# id :integer not null, primary key
+# url :string(255)
+# project_id :integer
+# created_at :datetime not null
+# updated_at :datetime not null
+# type :string(255) default("ProjectHook")
+#
+
class SystemHook < WebHook
def async_execute(data)
diff --git a/app/models/user.rb b/app/models/user.rb
index a8626cc187a..f33f01fd72b 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -111,13 +111,13 @@ end
#
# Table name: users
#
-# id :integer(4) not null, primary key
+# id :integer 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(4) default(0)
+# sign_in_count :integer default(0)
# current_sign_in_at :datetime
# last_sign_in_at :datetime
# current_sign_in_ip :string(255)
@@ -125,14 +125,19 @@ end
# created_at :datetime not null
# updated_at :datetime not null
# name :string(255)
-# admin :boolean(1) default(FALSE), not null
-# projects_limit :integer(4) default(10)
+# admin :boolean default(FALSE), not null
+# projects_limit :integer 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(1) default(FALSE), not null
-# theme_id :integer(4) default(1), not null
+# dark_scheme :boolean default(FALSE), not null
+# theme_id :integer default(1), not null
# bio :string(255)
-# blocked :boolean(1) default(FALSE), not null
+# blocked :boolean default(FALSE), not null
+# failed_attempts :integer default(0)
+# locked_at :datetime
+# extern_uid :string(255)
+# provider :string(255)
#
+
diff --git a/app/models/users_project.rb b/app/models/users_project.rb
index c42cc86593c..171bf2bba83 100644
--- a/app/models/users_project.rb
+++ b/app/models/users_project.rb
@@ -92,11 +92,11 @@ end
#
# Table name: users_projects
#
-# id :integer(4) not null, primary key
-# user_id :integer(4) not null
-# project_id :integer(4) not null
+# id :integer not null, primary key
+# user_id :integer not null
+# project_id :integer not null
# created_at :datetime not null
# updated_at :datetime not null
-# project_access :integer(4) default(0), not null
+# project_access :integer default(0), not null
#
diff --git a/app/models/web_hook.rb b/app/models/web_hook.rb
index 5d826d2fb6d..b2e481e65ea 100644
--- a/app/models/web_hook.rb
+++ b/app/models/web_hook.rb
@@ -30,10 +30,11 @@ end
#
# Table name: web_hooks
#
-# id :integer(4) not null, primary key
+# id :integer not null, primary key
# url :string(255)
-# project_id :integer(4)
+# project_id :integer
# created_at :datetime not null
# updated_at :datetime not null
+# type :string(255) default("ProjectHook")
#
diff --git a/app/models/wiki.rb b/app/models/wiki.rb
index b053f5ad412..a81a151bca7 100644
--- a/app/models/wiki.rb
+++ b/app/models/wiki.rb
@@ -36,13 +36,13 @@ end
#
# Table name: wikis
#
-# id :integer(4) not null, primary key
+# id :integer not null, primary key
# title :string(255)
# content :text
-# project_id :integer(4)
+# project_id :integer
# created_at :datetime not null
# updated_at :datetime not null
# slug :string(255)
-# user_id :integer(4)
+# user_id :integer
#