Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-04-13 21:08:33 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-04-13 21:08:33 +0300
commit953eb09e086c8f2842512a62e56e32223b5bf974 (patch)
tree3915a57e930263b7c31a1b5e819db50f7d3a609f /doc/development/sql.md
parent907fd5d94ecec19ff7de4986e83e75e6fa082558 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/development/sql.md')
-rw-r--r--doc/development/sql.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/development/sql.md b/doc/development/sql.md
index c1f4ad39650..4b6153b7205 100644
--- a/doc/development/sql.md
+++ b/doc/development/sql.md
@@ -254,13 +254,13 @@ of records plucked. `MAX_PLUCK` defaults to `1_000` in `ApplicationRecord`.
## Inherit from ApplicationRecord
-Most models in the GitLab codebase should inherit from `ApplicationRecord`,
-rather than from `ActiveRecord::Base`. This allows helper methods to be easily
-added.
+Most models in the GitLab codebase should inherit from `ApplicationRecord`
+or `Ci::ApplicationRecord` rather than from `ActiveRecord::Base`. This allows
+helper methods to be easily added.
An exception to this rule exists for models created in database migrations. As
these should be isolated from application code, they should continue to subclass
-from `ActiveRecord::Base`.
+from `MigrationRecord` which is available only in migration context.
## Use UNIONs