From 98ee4a1fa73183cacf6c470b56e34afccec1c5dc Mon Sep 17 00:00:00 2001
From: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Date: Thu, 22 Jan 2015 09:40:03 -0800
Subject: Annotate models

---
 app/models/application_setting.rb               | 15 +++++++++++++++
 app/models/identity.rb                          | 12 +++++++++++-
 app/models/merge_request.rb                     |  1 +
 app/models/project.rb                           |  2 ++
 app/models/project_services/bamboo_service.rb   | 14 ++++++++++++++
 app/models/project_services/teamcity_service.rb | 14 ++++++++++++++
 app/models/protected_branch.rb                  | 11 ++++++-----
 app/models/user.rb                              |  5 ++---
 8 files changed, 65 insertions(+), 9 deletions(-)

(limited to 'app')

diff --git a/app/models/application_setting.rb b/app/models/application_setting.rb
index aed4068f309..45ae79a75cc 100644
--- a/app/models/application_setting.rb
+++ b/app/models/application_setting.rb
@@ -1,3 +1,18 @@
+# == Schema Information
+#
+# Table name: application_settings
+#
+#  id                     :integer          not null, primary key
+#  default_projects_limit :integer
+#  signup_enabled         :boolean
+#  signin_enabled         :boolean
+#  gravatar_enabled       :boolean
+#  sign_in_text           :text
+#  created_at             :datetime
+#  updated_at             :datetime
+#  home_page_url          :string(255)
+#
+
 class ApplicationSetting < ActiveRecord::Base
   validates :home_page_url, allow_blank: true,
     format: { with: URI::regexp(%w(http https)), message: "should be a valid url" },
diff --git a/app/models/identity.rb b/app/models/identity.rb
index 5fb1850c30b..c7cdb63e3d2 100644
--- a/app/models/identity.rb
+++ b/app/models/identity.rb
@@ -1,5 +1,15 @@
+# == Schema Information
+#
+# Table name: identities
+#
+#  id         :integer          not null, primary key
+#  extern_uid :string(255)
+#  provider   :string(255)
+#  user_id    :integer
+#
+
 class Identity < ActiveRecord::Base
   belongs_to :user
 
   validates :extern_uid, allow_blank: true, uniqueness: {scope: :provider}
-end
\ No newline at end of file
+end
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb
index ae6f88c2e6a..715257f905f 100644
--- a/app/models/merge_request.rb
+++ b/app/models/merge_request.rb
@@ -18,6 +18,7 @@
 #  iid               :integer
 #  description       :text
 #  position          :integer          default(0)
+#  locked_at         :datetime
 #
 
 require Rails.root.join("app/models/commit")
diff --git a/app/models/project.rb b/app/models/project.rb
index 4785199b14c..f102c477404 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -24,6 +24,8 @@
 #  import_status          :string(255)
 #  repository_size        :float            default(0.0)
 #  star_count             :integer          default(0), not null
+#  import_type            :string(255)
+#  import_source          :string(255)
 #
 
 class Project < ActiveRecord::Base
diff --git a/app/models/project_services/bamboo_service.rb b/app/models/project_services/bamboo_service.rb
index b9eec9ab21e..16e1b83da4b 100644
--- a/app/models/project_services/bamboo_service.rb
+++ b/app/models/project_services/bamboo_service.rb
@@ -1,3 +1,17 @@
+# == Schema Information
+#
+# Table name: services
+#
+#  id         :integer          not null, primary key
+#  type       :string(255)
+#  title      :string(255)
+#  project_id :integer          not null
+#  created_at :datetime
+#  updated_at :datetime
+#  active     :boolean          default(FALSE), not null
+#  properties :text
+#
+
 class BambooService < CiService
   include HTTParty
 
diff --git a/app/models/project_services/teamcity_service.rb b/app/models/project_services/teamcity_service.rb
index 52b5862e4d1..dca718b5e8c 100644
--- a/app/models/project_services/teamcity_service.rb
+++ b/app/models/project_services/teamcity_service.rb
@@ -1,3 +1,17 @@
+# == Schema Information
+#
+# Table name: services
+#
+#  id         :integer          not null, primary key
+#  type       :string(255)
+#  title      :string(255)
+#  project_id :integer          not null
+#  created_at :datetime
+#  updated_at :datetime
+#  active     :boolean          default(FALSE), not null
+#  properties :text
+#
+
 class TeamcityService < CiService
   include HTTParty
 
diff --git a/app/models/protected_branch.rb b/app/models/protected_branch.rb
index 1b06dd77523..97207ba1272 100644
--- a/app/models/protected_branch.rb
+++ b/app/models/protected_branch.rb
@@ -2,11 +2,12 @@
 #
 # Table name: protected_branches
 #
-#  id         :integer          not null, primary key
-#  project_id :integer          not null
-#  name       :string(255)      not null
-#  created_at :datetime
-#  updated_at :datetime
+#  id                  :integer          not null, primary key
+#  project_id          :integer          not null
+#  name                :string(255)      not null
+#  created_at          :datetime
+#  updated_at          :datetime
+#  developers_can_push :boolean          default(FALSE), not null
 #
 
 class ProtectedBranch < ActiveRecord::Base
diff --git a/app/models/user.rb b/app/models/user.rb
index 852f3fc48cf..69fe674df83 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -26,8 +26,6 @@
 #  bio                      :string(255)
 #  failed_attempts          :integer          default(0)
 #  locked_at                :datetime
-#  extern_uid               :string(255)
-#  provider                 :string(255)
 #  username                 :string(255)
 #  can_create_group         :boolean          default(TRUE), not null
 #  can_create_team          :boolean          default(TRUE), not null
@@ -36,7 +34,6 @@
 #  notification_level       :integer          default(1), not null
 #  password_expires_at      :datetime
 #  created_by_id            :integer
-#  last_credential_check_at :datetime
 #  avatar                   :string(255)
 #  confirmation_token       :string(255)
 #  confirmed_at             :datetime
@@ -44,6 +41,8 @@
 #  unconfirmed_email        :string(255)
 #  hide_no_ssh_key          :boolean          default(FALSE)
 #  website_url              :string(255)      default(""), not null
+#  last_credential_check_at :datetime
+#  github_access_token      :string(255)
 #
 
 require 'carrierwave/orm/activerecord'
-- 
cgit v1.2.1