summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-06-19 15:40:33 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-06-19 15:40:33 +0300
commit6e35aceff29ddeae6282de31e81e48446ab927fa (patch)
tree34e777e35797f2d55ce82a3e807323523dda74be /app/models
parent78680a81774d67997fa0abece4dc1d4a5ec12ce6 (diff)
downloadgitlab-ce-6e35aceff29ddeae6282de31e81e48446ab927fa.tar.gz
Annotated
Diffstat (limited to 'app/models')
-rw-r--r--app/models/campfire_service.rb2
-rw-r--r--app/models/deploy_key.rb14
-rw-r--r--app/models/deploy_keys_project.rb11
-rw-r--r--app/models/forked_project_link.rb11
-rw-r--r--app/models/gitlab_ci_service.rb2
-rw-r--r--app/models/hipchat_service.rb4
-rw-r--r--app/models/issue.rb4
-rw-r--r--app/models/key.rb6
-rw-r--r--app/models/merge_request.rb4
-rw-r--r--app/models/note.rb4
-rw-r--r--app/models/personal_snippet.rb9
-rw-r--r--app/models/project.rb5
-rw-r--r--app/models/project_hook.rb4
-rw-r--r--app/models/project_snippet.rb9
-rw-r--r--app/models/service.rb2
-rw-r--r--app/models/service_hook.rb4
-rw-r--r--app/models/snippet.rb9
-rw-r--r--app/models/system_hook.rb4
-rw-r--r--app/models/user.rb8
-rw-r--r--app/models/users_group.rb12
-rw-r--r--app/models/users_project.rb4
-rw-r--r--app/models/web_hook.rb4
22 files changed, 99 insertions, 37 deletions
diff --git a/app/models/campfire_service.rb b/app/models/campfire_service.rb
index 6450ffe7318..fb2a49fd586 100644
--- a/app/models/campfire_service.rb
+++ b/app/models/campfire_service.rb
@@ -11,6 +11,8 @@
# updated_at :datetime not null
# active :boolean default(FALSE), not null
# project_url :string(255)
+# subdomain :string(255)
+# room :string(255)
#
class CampfireService < Service
diff --git a/app/models/deploy_key.rb b/app/models/deploy_key.rb
index 548ef4f9a27..f983198085c 100644
--- a/app/models/deploy_key.rb
+++ b/app/models/deploy_key.rb
@@ -1,3 +1,17 @@
+# == Schema Information
+#
+# Table name: keys
+#
+# id :integer not null, primary key
+# user_id :integer
+# created_at :datetime
+# updated_at :datetime
+# key :text
+# title :string(255)
+# identifier :string(255)
+# type :string(255)
+#
+
class DeployKey < Key
has_many :deploy_keys_projects, dependent: :destroy
has_many :projects, through: :deploy_keys_projects
diff --git a/app/models/deploy_keys_project.rb b/app/models/deploy_keys_project.rb
index 48350a3e4d9..6f109e48314 100644
--- a/app/models/deploy_keys_project.rb
+++ b/app/models/deploy_keys_project.rb
@@ -1,3 +1,14 @@
+# == Schema Information
+#
+# Table name: deploy_keys_projects
+#
+# id :integer not null, primary key
+# deploy_key_id :integer not null
+# project_id :integer not null
+# created_at :datetime not null
+# updated_at :datetime not null
+#
+
class DeployKeysProject < ActiveRecord::Base
attr_accessible :key_id, :project_id
diff --git a/app/models/forked_project_link.rb b/app/models/forked_project_link.rb
index c3199ca264e..aaa527a1145 100644
--- a/app/models/forked_project_link.rb
+++ b/app/models/forked_project_link.rb
@@ -1,3 +1,14 @@
+# == Schema Information
+#
+# Table name: forked_project_links
+#
+# id :integer not null, primary key
+# forked_to_project_id :integer not null
+# forked_from_project_id :integer not null
+# created_at :datetime not null
+# updated_at :datetime not null
+#
+
class ForkedProjectLink < ActiveRecord::Base
attr_accessible :forked_from_project_id, :forked_to_project_id
diff --git a/app/models/gitlab_ci_service.rb b/app/models/gitlab_ci_service.rb
index bdbe7724be0..7f5380a4551 100644
--- a/app/models/gitlab_ci_service.rb
+++ b/app/models/gitlab_ci_service.rb
@@ -11,6 +11,8 @@
# updated_at :datetime not null
# active :boolean default(FALSE), not null
# project_url :string(255)
+# subdomain :string(255)
+# room :string(255)
#
class GitlabCiService < Service
diff --git a/app/models/hipchat_service.rb b/app/models/hipchat_service.rb
index 13429fa83b4..c3fb4826334 100644
--- a/app/models/hipchat_service.rb
+++ b/app/models/hipchat_service.rb
@@ -11,6 +11,8 @@
# updated_at :datetime not null
# active :boolean default(FALSE), not null
# project_url :string(255)
+# subdomain :string(255)
+# room :string(255)
#
class HipchatService < Service
@@ -70,4 +72,4 @@ class HipchatService < Service
message
end
-end \ No newline at end of file
+end
diff --git a/app/models/issue.rb b/app/models/issue.rb
index de6e015c68e..f56928891dc 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -7,8 +7,8 @@
# assignee_id :integer
# author_id :integer
# project_id :integer
-# created_at :datetime not null
-# updated_at :datetime not null
+# created_at :datetime
+# updated_at :datetime
# position :integer default(0)
# branch_name :string(255)
# description :text
diff --git a/app/models/key.rb b/app/models/key.rb
index 185aef46e9e..a87ea4943e9 100644
--- a/app/models/key.rb
+++ b/app/models/key.rb
@@ -4,12 +4,12 @@
#
# id :integer not null, primary key
# user_id :integer
-# created_at :datetime not null
-# updated_at :datetime not null
+# created_at :datetime
+# updated_at :datetime
# key :text
# title :string(255)
# identifier :string(255)
-# project_id :integer
+# type :string(255)
#
require 'digest/md5'
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb
index f41473336bc..c45af9f713e 100644
--- a/app/models/merge_request.rb
+++ b/app/models/merge_request.rb
@@ -9,8 +9,8 @@
# author_id :integer
# assignee_id :integer
# title :string(255)
-# created_at :datetime not null
-# updated_at :datetime not null
+# created_at :datetime
+# updated_at :datetime
# st_commits :text(2147483647)
# st_diffs :text(2147483647)
# milestone_id :integer
diff --git a/app/models/note.rb b/app/models/note.rb
index 9a3481faaaa..c2e664d1bcd 100644
--- a/app/models/note.rb
+++ b/app/models/note.rb
@@ -6,8 +6,8 @@
# note :text
# noteable_type :string(255)
# author_id :integer
-# created_at :datetime not null
-# updated_at :datetime not null
+# created_at :datetime
+# updated_at :datetime
# project_id :integer
# attachment :string(255)
# line_code :string(255)
diff --git a/app/models/personal_snippet.rb b/app/models/personal_snippet.rb
index d581c6092aa..a3c0d201ee5 100644
--- a/app/models/personal_snippet.rb
+++ b/app/models/personal_snippet.rb
@@ -6,13 +6,14 @@
# title :string(255)
# content :text
# author_id :integer not null
-# project_id :integer not null
-# created_at :datetime not null
-# updated_at :datetime not null
+# project_id :integer
+# created_at :datetime
+# updated_at :datetime
# file_name :string(255)
# expires_at :datetime
+# private :boolean default(TRUE), not null
# type :string(255)
-# private :boolean
+#
class PersonalSnippet < Snippet
end
diff --git a/app/models/project.rb b/app/models/project.rb
index 234d5e98b4f..ff61eca60de 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -6,8 +6,8 @@
# name :string(255)
# path :string(255)
# description :text
-# created_at :datetime not null
-# updated_at :datetime not null
+# created_at :datetime
+# updated_at :datetime
# creator_id :integer
# default_branch :string(255)
# issues_enabled :boolean default(TRUE), not null
@@ -20,6 +20,7 @@
# issues_tracker_id :string(255)
# snippets_enabled :boolean default(TRUE), not null
# last_activity_at :datetime
+# imported :boolean default(FALSE), not null
#
require "grit"
diff --git a/app/models/project_hook.rb b/app/models/project_hook.rb
index 2576fc979d4..b82e1ffd4ab 100644
--- a/app/models/project_hook.rb
+++ b/app/models/project_hook.rb
@@ -5,8 +5,8 @@
# id :integer not null, primary key
# url :string(255)
# project_id :integer
-# created_at :datetime not null
-# updated_at :datetime not null
+# created_at :datetime
+# updated_at :datetime
# type :string(255) default("ProjectHook")
# service_id :integer
#
diff --git a/app/models/project_snippet.rb b/app/models/project_snippet.rb
index a86f2e7a32f..14c88046423 100644
--- a/app/models/project_snippet.rb
+++ b/app/models/project_snippet.rb
@@ -6,13 +6,14 @@
# title :string(255)
# content :text
# author_id :integer not null
-# project_id :integer not null
-# created_at :datetime not null
-# updated_at :datetime not null
+# project_id :integer
+# created_at :datetime
+# updated_at :datetime
# file_name :string(255)
# expires_at :datetime
+# private :boolean default(TRUE), not null
# type :string(255)
-# private :boolean
+#
class ProjectSnippet < Snippet
belongs_to :project
diff --git a/app/models/service.rb b/app/models/service.rb
index 3e945aa898c..d21e8a2c567 100644
--- a/app/models/service.rb
+++ b/app/models/service.rb
@@ -11,6 +11,8 @@
# updated_at :datetime not null
# active :boolean default(FALSE), not null
# project_url :string(255)
+# subdomain :string(255)
+# room :string(255)
#
# To add new service you should build a class inherited from Service
diff --git a/app/models/service_hook.rb b/app/models/service_hook.rb
index 4cd2b272eec..433e8059788 100644
--- a/app/models/service_hook.rb
+++ b/app/models/service_hook.rb
@@ -5,8 +5,8 @@
# id :integer not null, primary key
# url :string(255)
# project_id :integer
-# created_at :datetime not null
-# updated_at :datetime not null
+# created_at :datetime
+# updated_at :datetime
# type :string(255) default("ProjectHook")
# service_id :integer
#
diff --git a/app/models/snippet.rb b/app/models/snippet.rb
index 1b37ffe8339..3a2fc17e59c 100644
--- a/app/models/snippet.rb
+++ b/app/models/snippet.rb
@@ -6,13 +6,14 @@
# title :string(255)
# content :text
# author_id :integer not null
-# project_id :integer not null
-# created_at :datetime not null
-# updated_at :datetime not null
+# project_id :integer
+# created_at :datetime
+# updated_at :datetime
# file_name :string(255)
# expires_at :datetime
+# private :boolean default(TRUE), not null
# type :string(255)
-# private :boolean
+#
class Snippet < ActiveRecord::Base
include Linguist::BlobHelper
diff --git a/app/models/system_hook.rb b/app/models/system_hook.rb
index 5cdf046644f..2d28f4cd452 100644
--- a/app/models/system_hook.rb
+++ b/app/models/system_hook.rb
@@ -5,8 +5,8 @@
# id :integer not null, primary key
# url :string(255)
# project_id :integer
-# created_at :datetime not null
-# updated_at :datetime not null
+# created_at :datetime
+# updated_at :datetime
# type :string(255) default("ProjectHook")
# service_id :integer
#
diff --git a/app/models/user.rb b/app/models/user.rb
index d8c9ac647b5..6a5411b222d 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -4,7 +4,7 @@
#
# id :integer not null, primary key
# email :string(255) default(""), not null
-# encrypted_password :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
@@ -13,8 +13,8 @@
# last_sign_in_at :datetime
# current_sign_in_ip :string(255)
# last_sign_in_ip :string(255)
-# created_at :datetime not null
-# updated_at :datetime not null
+# created_at :datetime
+# updated_at :datetime
# name :string(255)
# admin :boolean default(FALSE), not null
# projects_limit :integer default(10)
@@ -34,6 +34,8 @@
# state :string(255)
# color_scheme_id :integer default(1), not null
# notification_level :integer default(1), not null
+# password_expires_at :datetime
+# created_by_id :integer
#
class User < ActiveRecord::Base
diff --git a/app/models/users_group.rb b/app/models/users_group.rb
index 0cb26854f9c..d70f56f681f 100644
--- a/app/models/users_group.rb
+++ b/app/models/users_group.rb
@@ -1,3 +1,15 @@
+# == Schema Information
+#
+# Table name: users_groups
+#
+# id :integer not null, primary key
+# group_access :integer not null
+# group_id :integer not null
+# user_id :integer not null
+# created_at :datetime not null
+# updated_at :datetime not null
+#
+
class UsersGroup < ActiveRecord::Base
GUEST = 10
REPORTER = 20
diff --git a/app/models/users_project.rb b/app/models/users_project.rb
index 4c58b009380..58d05fbe077 100644
--- a/app/models/users_project.rb
+++ b/app/models/users_project.rb
@@ -5,8 +5,8 @@
# 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
+# created_at :datetime
+# updated_at :datetime
# project_access :integer default(0), not null
# notification_level :integer default(3), not null
#
diff --git a/app/models/web_hook.rb b/app/models/web_hook.rb
index 3f22b1082fb..1e6ea885ea9 100644
--- a/app/models/web_hook.rb
+++ b/app/models/web_hook.rb
@@ -5,8 +5,8 @@
# id :integer not null, primary key
# url :string(255)
# project_id :integer
-# created_at :datetime not null
-# updated_at :datetime not null
+# created_at :datetime
+# updated_at :datetime
# type :string(255) default("ProjectHook")
# service_id :integer
#