Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
f8aa9be0
Commit
f8aa9be0
authored
Oct 12, 2020
by
Drew Blessing
Committed by
Adam Hegyi
Oct 19, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create `saml_group_links` database table
Creates a table to store SAML Group Links, similar to LDAP Group Links.
parent
ea70a6e4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
0 deletions
+64
-0
db/migrate/20201012194936_create_saml_group_links.rb
db/migrate/20201012194936_create_saml_group_links.rb
+32
-0
db/schema_migrations/20201012194936
db/schema_migrations/20201012194936
+1
-0
db/structure.sql
db/structure.sql
+31
-0
No files found.
db/migrate/20201012194936_create_saml_group_links.rb
0 → 100644
View file @
f8aa9be0
# frozen_string_literal: true
class
CreateSamlGroupLinks
<
ActiveRecord
::
Migration
[
6.0
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
disable_ddl_transaction!
def
up
unless
table_exists?
(
:saml_group_links
)
with_lock_retries
do
create_table
:saml_group_links
do
|
t
|
t
.
references
:group
,
foreign_key:
{
to_table: :namespaces
,
on_delete: :cascade
},
null:
false
t
.
timestamps_with_timezone
t
.
integer
:access_level
,
null:
false
t
.
text
:group_name
,
null:
false
t
.
index
[
:group_id
,
:group_name
],
unique:
true
end
end
end
add_text_limit
:saml_group_links
,
:group_name
,
255
end
def
down
with_lock_retries
do
drop_table
:saml_group_links
end
end
end
db/schema_migrations/20201012194936
0 → 100644
View file @
f8aa9be0
823d23d8ce8959762a7cadb883ed6d36a46fedaf238ea955d93136277d55cad5
\ No newline at end of file
db/structure.sql
View file @
f8aa9be0
...
...
@@ -15752,6 +15752,25 @@ CREATE SEQUENCE routes_id_seq
ALTER
SEQUENCE
routes_id_seq
OWNED
BY
routes
.
id
;
CREATE
TABLE
saml_group_links
(
id
bigint
NOT
NULL
,
group_id
bigint
NOT
NULL
,
created_at
timestamp
with
time
zone
NOT
NULL
,
updated_at
timestamp
with
time
zone
NOT
NULL
,
access_level
integer
NOT
NULL
,
group_name
text
NOT
NULL
,
CONSTRAINT
check_1a5ae2ac07
CHECK
((
char_length
(
group_name
)
<=
255
))
);
CREATE
SEQUENCE
saml_group_links_id_seq
START
WITH
1
INCREMENT
BY
1
NO
MINVALUE
NO
MAXVALUE
CACHE
1
;
ALTER
SEQUENCE
saml_group_links_id_seq
OWNED
BY
saml_group_links
.
id
;
CREATE
TABLE
saml_providers
(
id
integer
NOT
NULL
,
group_id
integer
NOT
NULL
,
...
...
@@ -17898,6 +17917,8 @@ ALTER TABLE ONLY reviews ALTER COLUMN id SET DEFAULT nextval('reviews_id_seq'::r
ALTER
TABLE
ONLY
routes
ALTER
COLUMN
id
SET
DEFAULT
nextval
(
'routes_id_seq'
::
regclass
);
ALTER
TABLE
ONLY
saml_group_links
ALTER
COLUMN
id
SET
DEFAULT
nextval
(
'saml_group_links_id_seq'
::
regclass
);
ALTER
TABLE
ONLY
saml_providers
ALTER
COLUMN
id
SET
DEFAULT
nextval
(
'saml_providers_id_seq'
::
regclass
);
ALTER
TABLE
ONLY
scim_identities
ALTER
COLUMN
id
SET
DEFAULT
nextval
(
'scim_identities_id_seq'
::
regclass
);
...
...
@@ -19206,6 +19227,9 @@ ALTER TABLE ONLY reviews
ALTER
TABLE
ONLY
routes
ADD
CONSTRAINT
routes_pkey
PRIMARY
KEY
(
id
);
ALTER
TABLE
ONLY
saml_group_links
ADD
CONSTRAINT
saml_group_links_pkey
PRIMARY
KEY
(
id
);
ALTER
TABLE
ONLY
saml_providers
ADD
CONSTRAINT
saml_providers_pkey
PRIMARY
KEY
(
id
);
...
...
@@ -21454,6 +21478,10 @@ CREATE INDEX index_routes_on_path_trigram ON routes USING gin (path gin_trgm_ops
CREATE
UNIQUE
INDEX
index_routes_on_source_type_and_source_id
ON
routes
USING
btree
(
source_type
,
source_id
);
CREATE
INDEX
index_saml_group_links_on_group_id
ON
saml_group_links
USING
btree
(
group_id
);
CREATE
UNIQUE
INDEX
index_saml_group_links_on_group_id_and_group_name
ON
saml_group_links
USING
btree
(
group_id
,
group_name
);
CREATE
INDEX
index_saml_providers_on_group_id
ON
saml_providers
USING
btree
(
group_id
);
CREATE
INDEX
index_scim_identities_on_group_id
ON
scim_identities
USING
btree
(
group_id
);
...
...
@@ -23025,6 +23053,9 @@ ALTER TABLE ONLY clusters_applications_runners
ALTER
TABLE
ONLY
service_desk_settings
ADD
CONSTRAINT
fk_rails_223a296a85
FOREIGN
KEY
(
project_id
)
REFERENCES
projects
(
id
)
ON
DELETE
CASCADE
;
ALTER
TABLE
ONLY
saml_group_links
ADD
CONSTRAINT
fk_rails_22e312c530
FOREIGN
KEY
(
group_id
)
REFERENCES
namespaces
(
id
)
ON
DELETE
CASCADE
;
ALTER
TABLE
ONLY
group_custom_attributes
ADD
CONSTRAINT
fk_rails_246e0db83a
FOREIGN
KEY
(
group_id
)
REFERENCES
namespaces
(
id
)
ON
DELETE
CASCADE
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment