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
72438f10
Commit
72438f10
authored
Apr 24, 2020
by
Heinrich Lee Yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove namespaces.plan_id column
This column is unused and already ignored in the previous release
parent
0138be44
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
6 deletions
+32
-6
changelogs/unreleased/196862-drop-plan-id.yml
changelogs/unreleased/196862-drop-plan-id.yml
+5
-0
db/post_migrate/20200424043515_drop_namespaces_plan_id.rb
db/post_migrate/20200424043515_drop_namespaces_plan_id.rb
+26
-0
db/structure.sql
db/structure.sql
+1
-6
No files found.
changelogs/unreleased/196862-drop-plan-id.yml
0 → 100644
View file @
72438f10
---
title
:
Remove namespaces.plan_id column
merge_request
:
30351
author
:
type
:
other
db/post_migrate/20200424043515_drop_namespaces_plan_id.rb
0 → 100644
View file @
72438f10
# frozen_string_literal: true
class
DropNamespacesPlanId
<
ActiveRecord
::
Migration
[
6.0
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
disable_ddl_transaction!
def
up
with_lock_retries
do
# rubocop: disable Migration/WithLockRetriesWithoutDdlTransaction
remove_column
:namespaces
,
:plan_id
end
end
def
down
unless
column_exists?
(
:namespaces
,
:plan_id
)
with_lock_retries
do
# rubocop: disable Migration/WithLockRetriesWithoutDdlTransaction
add_column
:namespaces
,
:plan_id
,
:integer
end
end
add_concurrent_index
:namespaces
,
:plan_id
add_concurrent_foreign_key
:namespaces
,
:plans
,
column: :plan_id
,
on_delete: :nullify
end
end
db/structure.sql
View file @
72438f10
...
...
@@ -4100,7 +4100,6 @@ CREATE TABLE public.namespaces (
require_two_factor_authentication
boolean
DEFAULT
false
NOT
NULL
,
two_factor_grace_period
integer
DEFAULT
48
NOT
NULL
,
cached_markdown_version
integer
,
plan_id
integer
,
project_creation_level
integer
,
runners_token
character
varying
,
trial_ends_on
timestamp
with
time
zone
,
...
...
@@ -9893,8 +9892,6 @@ CREATE INDEX index_namespaces_on_path ON public.namespaces USING btree (path);
CREATE
INDEX
index_namespaces_on_path_trigram
ON
public
.
namespaces
USING
gin
(
path
public
.
gin_trgm_ops
);
CREATE
INDEX
index_namespaces_on_plan_id
ON
public
.
namespaces
USING
btree
(
plan_id
);
CREATE
UNIQUE
INDEX
index_namespaces_on_push_rule_id
ON
public
.
namespaces
USING
btree
(
push_rule_id
);
CREATE
INDEX
index_namespaces_on_require_two_factor_authentication
ON
public
.
namespaces
USING
btree
(
require_two_factor_authentication
);
...
...
@@ -11332,9 +11329,6 @@ ALTER TABLE ONLY public.system_note_metadata
ALTER
TABLE
ONLY
public
.
merge_requests
ADD
CONSTRAINT
fk_fd82eae0b9
FOREIGN
KEY
(
head_pipeline_id
)
REFERENCES
public
.
ci_pipelines
(
id
)
ON
DELETE
SET
NULL
;
ALTER
TABLE
ONLY
public
.
namespaces
ADD
CONSTRAINT
fk_fdd12e5b80
FOREIGN
KEY
(
plan_id
)
REFERENCES
public
.
plans
(
id
)
ON
DELETE
SET
NULL
;
ALTER
TABLE
ONLY
public
.
project_import_data
ADD
CONSTRAINT
fk_ffb9ee3a10
FOREIGN
KEY
(
project_id
)
REFERENCES
public
.
projects
(
id
)
ON
DELETE
CASCADE
;
...
...
@@ -13562,6 +13556,7 @@ COPY "schema_migrations" (version) FROM STDIN;
20200423080607
20200423081409
20200423101529
20200424043515
20200424050250
20200427064130
\
.
...
...
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