diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-18 15:13:46 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-18 15:13:46 +0300 |
commit | 9796aa22cd601f03101402540f41a05ad71828e5 (patch) | |
tree | af5934ea6156c4b31fd67bb7f5bd3a3de86b35fd /db | |
parent | f7e83434e312ca6cf598c6d815fe32dc200e3056 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20211115145107_add_created_at_to_namespace_monthly_usages.rb | 17 | ||||
-rw-r--r-- | db/migrate/20211115154103_add_created_at_to_project_monthly_usage.rb | 17 | ||||
-rw-r--r-- | db/schema_migrations/20211115145107 | 1 | ||||
-rw-r--r-- | db/schema_migrations/20211115154103 | 1 | ||||
-rw-r--r-- | db/structure.sql | 2 |
5 files changed, 38 insertions, 0 deletions
diff --git a/db/migrate/20211115145107_add_created_at_to_namespace_monthly_usages.rb b/db/migrate/20211115145107_add_created_at_to_namespace_monthly_usages.rb new file mode 100644 index 00000000000..e0e2bec72ad --- /dev/null +++ b/db/migrate/20211115145107_add_created_at_to_namespace_monthly_usages.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class AddCreatedAtToNamespaceMonthlyUsages < Gitlab::Database::Migration[1.0] + disable_ddl_transaction! + + def up + with_lock_retries do + add_column :ci_namespace_monthly_usages, :created_at, :datetime_with_timezone + end + end + + def down + with_lock_retries do + remove_column :ci_namespace_monthly_usages, :created_at + end + end +end diff --git a/db/migrate/20211115154103_add_created_at_to_project_monthly_usage.rb b/db/migrate/20211115154103_add_created_at_to_project_monthly_usage.rb new file mode 100644 index 00000000000..eb0cd448da3 --- /dev/null +++ b/db/migrate/20211115154103_add_created_at_to_project_monthly_usage.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class AddCreatedAtToProjectMonthlyUsage < Gitlab::Database::Migration[1.0] + disable_ddl_transaction! + + def up + with_lock_retries do + add_column :ci_project_monthly_usages, :created_at, :datetime_with_timezone + end + end + + def down + with_lock_retries do + remove_column :ci_project_monthly_usages, :created_at + end + end +end diff --git a/db/schema_migrations/20211115145107 b/db/schema_migrations/20211115145107 new file mode 100644 index 00000000000..25270a5c587 --- /dev/null +++ b/db/schema_migrations/20211115145107 @@ -0,0 +1 @@ +2b6bc8067402744b79eee06022cf3c91ba7ffd519df83aae4067600a6bbf43ad
\ No newline at end of file diff --git a/db/schema_migrations/20211115154103 b/db/schema_migrations/20211115154103 new file mode 100644 index 00000000000..2b721bc7b39 --- /dev/null +++ b/db/schema_migrations/20211115154103 @@ -0,0 +1 @@ +ad65e6deb885397dc91f33dc117a50e9a1b6d60f4caed8c5b77d474ec0340995
\ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index 5373aa7a31e..b708e48a111 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -11748,6 +11748,7 @@ CREATE TABLE ci_namespace_monthly_usages ( amount_used numeric(18,2) DEFAULT 0.0 NOT NULL, notification_level smallint DEFAULT 100 NOT NULL, shared_runners_duration integer DEFAULT 0 NOT NULL, + created_at timestamp with time zone, CONSTRAINT ci_namespace_monthly_usages_year_month_constraint CHECK ((date = date_trunc('month'::text, (date)::timestamp with time zone))) ); @@ -11993,6 +11994,7 @@ CREATE TABLE ci_project_monthly_usages ( date date NOT NULL, amount_used numeric(18,2) DEFAULT 0.0 NOT NULL, shared_runners_duration integer DEFAULT 0 NOT NULL, + created_at timestamp with time zone, CONSTRAINT ci_project_monthly_usages_year_month_constraint CHECK ((date = date_trunc('month'::text, (date)::timestamp with time zone))) ); |