Skip to content

Add organizations table and model

Lee Tickett requested to merge 2256-add-organizations-and-contacts into master

What does this MR do?

In order for us to leverage GitLab as a CRM/service desk/many other activities we need to introduce the concept of "organizations" (aka companies/clients/customers). See #2256

This MR introduces the first iteration of the organization model / table

Screenshots or Screencasts (strongly suggested)

== 20210804200114 CreateOrganizations: migrating ==============================
-- create_table(:customer_relations_organizations, {})
-- quote_column_name(:name)
   -> 0.0000s
-- quote_column_name(:description)
   -> 0.0000s
   -> 0.0135s
-- quote_table_name("check_2ba9ef1c4c")
   -> 0.0001s
-- quote_table_name("check_e476b6058e")
   -> 0.0000s
-- quote_table_name(:customer_relations_organizations)
   -> 0.0000s
-- execute("ALTER TABLE \"customer_relations_organizations\"\nADD CONSTRAINT \"check_2ba9ef1c4c\" CHECK (char_length(\"name\") <= 255),\nADD CONSTRAINT \"check_e476b6058e\" CHECK (char_length(\"description\") <= 1024)\n")
   -> 0.0019s
== 20210804200114 CreateOrganizations: migrated (0.0203s) =====================

== 20210804200114 CreateOrganizations: reverting ==============================
-- drop_table(:customer_relations_organizations)
   -> 0.0021s
== 20210804200114 CreateOrganizations: reverted (0.0074s) =====================

How to setup and validate locally (strongly suggested)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Related to #2256

Edited by Lee Tickett

Merge request reports

Loading