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
af8c8507
Commit
af8c8507
authored
Jul 05, 2021
by
Alishan Ladhani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initialize conversion of ci_builds_metadata.id for bigint migration
Changelog: other
parent
8e948357
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
48 additions
and
1 deletion
+48
-1
app/models/ci/build_metadata.rb
app/models/ci/build_metadata.rb
+1
-0
db/migrate/20210705142714_initialize_conversion_of_ci_builds_metadata_id_to_bigint.rb
...itialize_conversion_of_ci_builds_metadata_id_to_bigint.rb
+16
-0
db/post_migrate/20210705143150_backfill_ci_builds_metadata_id_for_bigint_conversion.rb
...0_backfill_ci_builds_metadata_id_for_bigint_conversion.rb
+16
-0
db/schema_migrations/20210705142714
db/schema_migrations/20210705142714
+1
-0
db/schema_migrations/20210705143150
db/schema_migrations/20210705143150
+1
-0
db/structure.sql
db/structure.sql
+13
-1
No files found.
app/models/ci/build_metadata.rb
View file @
af8c8507
...
...
@@ -39,6 +39,7 @@ module Ci
}
ignore_column
:build_id_convert_to_bigint
,
remove_with:
'14.2'
,
remove_after:
'2021-08-22'
ignore_columns
:id_convert_to_bigint
,
remove_with:
'14.2'
,
remove_after:
'2021-08-22'
def
update_timeout_state
timeout
=
timeout_with_highest_precedence
...
...
db/migrate/20210705142714_initialize_conversion_of_ci_builds_metadata_id_to_bigint.rb
0 → 100644
View file @
af8c8507
# frozen_string_literal: true
class
InitializeConversionOfCiBuildsMetadataIdToBigint
<
ActiveRecord
::
Migration
[
6.1
]
include
Gitlab
::
Database
::
MigrationHelpers
TABLE
=
:ci_builds_metadata
COLUMN
=
:id
def
up
initialize_conversion_of_integer_to_bigint
(
TABLE
,
COLUMN
)
end
def
down
revert_initialize_conversion_of_integer_to_bigint
(
TABLE
,
COLUMN
)
end
end
db/post_migrate/20210705143150_backfill_ci_builds_metadata_id_for_bigint_conversion.rb
0 → 100644
View file @
af8c8507
# frozen_string_literal: true
class
BackfillCiBuildsMetadataIdForBigintConversion
<
ActiveRecord
::
Migration
[
6.1
]
include
Gitlab
::
Database
::
MigrationHelpers
TABLE
=
:ci_builds_metadata
COLUMN
=
:id
def
up
backfill_conversion_of_integer_to_bigint
TABLE
,
COLUMN
,
batch_size:
15000
,
sub_batch_size:
100
end
def
down
revert_backfill_conversion_of_integer_to_bigint
TABLE
,
COLUMN
end
end
db/schema_migrations/20210705142714
0 → 100644
View file @
af8c8507
b47570ac9018a50206f239ffdafce2e672e6888a11a51e01f6d59d62a6a929af
\ No newline at end of file
db/schema_migrations/20210705143150
0 → 100644
View file @
af8c8507
9240ebbc69525a5bc1732f5e0ee2903f2b40b8693f24fcb911e72b5ba943357e
\ No newline at end of file
db/structure.sql
View file @
af8c8507
...
...
@@ -87,6 +87,15 @@ BEGIN
END;
$$;
CREATE FUNCTION trigger_542d6c2ad72e() RETURNS trigger
LANGUAGE plpgsql
AS $$
BEGIN
NEW."id_convert_to_bigint" := NEW."id";
RETURN NEW;
END;
$$;
CREATE FUNCTION trigger_69523443cc10() RETURNS trigger
LANGUAGE plpgsql
AS $$
...
...
@@ -10579,7 +10588,8 @@ CREATE TABLE ci_builds_metadata (
environment_auto_stop_in character varying(255),
expanded_environment_name character varying(255),
secrets jsonb DEFAULT '{}'::jsonb NOT NULL,
build_id_convert_to_bigint bigint DEFAULT 0 NOT NULL
build_id_convert_to_bigint bigint DEFAULT 0 NOT NULL,
id_convert_to_bigint bigint DEFAULT 0 NOT NULL
);
CREATE SEQUENCE ci_builds_metadata_id_seq
...
...
@@ -25548,6 +25558,8 @@ CREATE TRIGGER trigger_490d204c00b3 BEFORE INSERT OR UPDATE ON ci_stages FOR EAC
CREATE TRIGGER trigger_51ab7cef8934 BEFORE INSERT OR UPDATE ON ci_builds_runner_session FOR EACH ROW EXECUTE FUNCTION trigger_51ab7cef8934();
CREATE TRIGGER trigger_542d6c2ad72e BEFORE INSERT OR UPDATE ON ci_builds_metadata FOR EACH ROW EXECUTE FUNCTION trigger_542d6c2ad72e();
CREATE TRIGGER trigger_69523443cc10 BEFORE INSERT OR UPDATE ON events FOR EACH ROW EXECUTE FUNCTION trigger_69523443cc10();
CREATE TRIGGER trigger_77f5e1d20482 BEFORE INSERT OR UPDATE ON deployments FOR EACH ROW EXECUTE FUNCTION trigger_77f5e1d20482();
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