Rename name_regex to name_regex_delete
What does this MR do?
Container expiration policies allow users to specify image tags in their container repositories to be cleaned up. The name_regex
field allows users to pass a regex value to specify tags to be removed.
Recently, name_regex_keep
was added to allow users to specify which tags will be retained regardless of the name_regex
value. With the introduction of this new param, name_regex
is not detailed enough to describe it's function, so we rename it to name_regex_delete
. This MR renames the column, and updates the project api and front end settings form to use this new column and attribute name.
Database
RenameContainerExpirationPoliciesNameRegexToNameRegexDelete Migrations
Up Migration
== 20200428044349 RenameContainerExpirationPoliciesNameRegexToNameRegexDelete: migrating
-- column_exists?(:container_expiration_policies, :project_id)
-> 0.0018s
-- transaction_open?()
-> 0.0000s
-- columns(:container_expiration_policies)
-> 0.0010s
-- add_column(:container_expiration_policies, :name_regex_delete, :string, {:limit=>255, :precision=>nil, :scale=>nil})
-> 0.0009s
-- transaction_open?()
-> 0.0000s
-- exec_query("SELECT COUNT(*) AS count FROM \"container_expiration_policies\"")
-> 0.0006s
-- exec_query("SELECT \"container_expiration_policies\".\"project_id\" FROM \"container_expiration_policies\" ORDER BY \"container_expiration_policies\".\"project_id\" ASC LIMIT 1")
-> 0.0004s
-- exec_query("SELECT \"container_expiration_policies\".\"project_id\" FROM \"container_expiration_policies\" WHERE \"container_expiration_policies\".\"project_id\" >= 1 ORDER BY \"container_expiration_policies\".\"project_id\" ASC LIMIT 1 OFFSET 1")
-> 0.0003s
-- execute("UPDATE \"container_expiration_policies\" SET \"name_regex_delete\" = \"container_expiration_policies\".\"name_regex\" WHERE \"container_expiration_policies\".\"project_id\" >= 1 AND \"container_expiration_policies\".\"project_id\" < 2")
-> 0.0005s
-- exec_query("SELECT \"container_expiration_policies\".\"project_id\" FROM \"container_expiration_policies\" WHERE \"container_expiration_policies\".\"project_id\" >= 2 ORDER BY \"container_expiration_policies\".\"project_id\" ASC LIMIT 1 OFFSET 1")
-> 0.0002s
-- execute("UPDATE \"container_expiration_policies\" SET \"name_regex_delete\" = \"container_expiration_policies\".\"name_regex\" WHERE \"container_expiration_policies\".\"project_id\" >= 2 AND \"container_expiration_policies\".\"project_id\" < 3")
-> 0.0004s
-- exec_query("SELECT \"container_expiration_policies\".\"project_id\" FROM \"container_expiration_policies\" WHERE \"container_expiration_policies\".\"project_id\" >= 3 ORDER BY \"container_expiration_policies\".\"project_id\" ASC LIMIT 1 OFFSET 1")
-> 0.0003s
-- execute("UPDATE \"container_expiration_policies\" SET \"name_regex_delete\" = \"container_expiration_policies\".\"name_regex\" WHERE \"container_expiration_policies\".\"project_id\" >= 3 AND \"container_expiration_policies\".\"project_id\" < 4")
-> 0.0003s
-- exec_query("SELECT \"container_expiration_policies\".\"project_id\" FROM \"container_expiration_policies\" WHERE \"container_expiration_policies\".\"project_id\" >= 4 ORDER BY \"container_expiration_policies\".\"project_id\" ASC LIMIT 1 OFFSET 1")
-> 0.0003s
-- execute("UPDATE \"container_expiration_policies\" SET \"name_regex_delete\" = \"container_expiration_policies\".\"name_regex\" WHERE \"container_expiration_policies\".\"project_id\" >= 4 AND \"container_expiration_policies\".\"project_id\" < 5")
-> 0.0004s
-- exec_query("SELECT \"container_expiration_policies\".\"project_id\" FROM \"container_expiration_policies\" WHERE \"container_expiration_policies\".\"project_id\" >= 5 ORDER BY \"container_expiration_policies\".\"project_id\" ASC LIMIT 1 OFFSET 1")
-> 0.0002s
-- execute("UPDATE \"container_expiration_policies\" SET \"name_regex_delete\" = \"container_expiration_policies\".\"name_regex\" WHERE \"container_expiration_policies\".\"project_id\" >= 5 AND \"container_expiration_policies\".\"project_id\" < 6")
-> 0.0003s
-- exec_query("SELECT \"container_expiration_policies\".\"project_id\" FROM \"container_expiration_policies\" WHERE \"container_expiration_policies\".\"project_id\" >= 6 ORDER BY \"container_expiration_policies\".\"project_id\" ASC LIMIT 1 OFFSET 1")
-> 0.0002s
-- execute("UPDATE \"container_expiration_policies\" SET \"name_regex_delete\" = \"container_expiration_policies\".\"name_regex\" WHERE \"container_expiration_policies\".\"project_id\" >= 6 AND \"container_expiration_policies\".\"project_id\" < 7")
-> 0.0003s
-- exec_query("SELECT \"container_expiration_policies\".\"project_id\" FROM \"container_expiration_policies\" WHERE \"container_expiration_policies\".\"project_id\" >= 7 ORDER BY \"container_expiration_policies\".\"project_id\" ASC LIMIT 1 OFFSET 1")
-> 0.0002s
-- execute("UPDATE \"container_expiration_policies\" SET \"name_regex_delete\" = \"container_expiration_policies\".\"name_regex\" WHERE \"container_expiration_policies\".\"project_id\" >= 7 AND \"container_expiration_policies\".\"project_id\" < 8")
-> 0.0003s
-- exec_query("SELECT \"container_expiration_policies\".\"project_id\" FROM \"container_expiration_policies\" WHERE \"container_expiration_policies\".\"project_id\" >= 8 ORDER BY \"container_expiration_policies\".\"project_id\" ASC LIMIT 1 OFFSET 1")
-> 0.0002s
-- execute("UPDATE \"container_expiration_policies\" SET \"name_regex_delete\" = \"container_expiration_policies\".\"name_regex\" WHERE \"container_expiration_policies\".\"project_id\" >= 8 AND \"container_expiration_policies\".\"project_id\" < 9")
-> 0.0003s
-- exec_query("SELECT \"container_expiration_policies\".\"project_id\" FROM \"container_expiration_policies\" WHERE \"container_expiration_policies\".\"project_id\" >= 9 ORDER BY \"container_expiration_policies\".\"project_id\" ASC LIMIT 1 OFFSET 1")
-> 0.0002s
-- execute("UPDATE \"container_expiration_policies\" SET \"name_regex_delete\" = \"container_expiration_policies\".\"name_regex\" WHERE \"container_expiration_policies\".\"project_id\" >= 9 AND \"container_expiration_policies\".\"project_id\" < 10")
-> 0.0004s
-- exec_query("SELECT \"container_expiration_policies\".\"project_id\" FROM \"container_expiration_policies\" WHERE \"container_expiration_policies\".\"project_id\" >= 10 ORDER BY \"container_expiration_policies\".\"project_id\" ASC LIMIT 1 OFFSET 1")
-> 0.0002s
-- execute("UPDATE \"container_expiration_policies\" SET \"name_regex_delete\" = \"container_expiration_policies\".\"name_regex\" WHERE \"container_expiration_policies\".\"project_id\" >= 10 AND \"container_expiration_policies\".\"project_id\" < 11")
-> 0.0003s
-- exec_query("SELECT \"container_expiration_policies\".\"project_id\" FROM \"container_expiration_policies\" WHERE \"container_expiration_policies\".\"project_id\" >= 11 ORDER BY \"container_expiration_policies\".\"project_id\" ASC LIMIT 1 OFFSET 1")
-> 0.0002s
-- execute("UPDATE \"container_expiration_policies\" SET \"name_regex_delete\" = \"container_expiration_policies\".\"name_regex\" WHERE \"container_expiration_policies\".\"project_id\" >= 11 AND \"container_expiration_policies\".\"project_id\" < 12")
-> 0.0003s
-- exec_query("SELECT \"container_expiration_policies\".\"project_id\" FROM \"container_expiration_policies\" WHERE \"container_expiration_policies\".\"project_id\" >= 12 ORDER BY \"container_expiration_policies\".\"project_id\" ASC LIMIT 1 OFFSET 1")
-> 0.0002s
-- execute("UPDATE \"container_expiration_policies\" SET \"name_regex_delete\" = \"container_expiration_policies\".\"name_regex\" WHERE \"container_expiration_policies\".\"project_id\" >= 12 AND \"container_expiration_policies\".\"project_id\" < 13")
-> 0.0003s
-- exec_query("SELECT \"container_expiration_policies\".\"project_id\" FROM \"container_expiration_policies\" WHERE \"container_expiration_policies\".\"project_id\" >= 13 ORDER BY \"container_expiration_policies\".\"project_id\" ASC LIMIT 1 OFFSET 1")
-> 0.0002s
-- execute("UPDATE \"container_expiration_policies\" SET \"name_regex_delete\" = \"container_expiration_policies\".\"name_regex\" WHERE \"container_expiration_policies\".\"project_id\" >= 13 AND \"container_expiration_policies\".\"project_id\" < 14")
-> 0.0003s
-- exec_query("SELECT \"container_expiration_policies\".\"project_id\" FROM \"container_expiration_policies\" WHERE \"container_expiration_policies\".\"project_id\" >= 14 ORDER BY \"container_expiration_policies\".\"project_id\" ASC LIMIT 1 OFFSET 1")
-> 0.0002s
-- execute("UPDATE \"container_expiration_policies\" SET \"name_regex_delete\" = \"container_expiration_policies\".\"name_regex\" WHERE \"container_expiration_policies\".\"project_id\" >= 14 AND \"container_expiration_policies\".\"project_id\" < 15")
-> 0.0003s
-- exec_query("SELECT \"container_expiration_policies\".\"project_id\" FROM \"container_expiration_policies\" WHERE \"container_expiration_policies\".\"project_id\" >= 15 ORDER BY \"container_expiration_policies\".\"project_id\" ASC LIMIT 1 OFFSET 1")
-> 0.0002s
-- execute("UPDATE \"container_expiration_policies\" SET \"name_regex_delete\" = \"container_expiration_policies\".\"name_regex\" WHERE \"container_expiration_policies\".\"project_id\" >= 15 AND \"container_expiration_policies\".\"project_id\" < 16")
-> 0.0004s
-- exec_query("SELECT \"container_expiration_policies\".\"project_id\" FROM \"container_expiration_policies\" WHERE \"container_expiration_policies\".\"project_id\" >= 16 ORDER BY \"container_expiration_policies\".\"project_id\" ASC LIMIT 1 OFFSET 1")
-> 0.0002s
-- execute("UPDATE \"container_expiration_policies\" SET \"name_regex_delete\" = \"container_expiration_policies\".\"name_regex\" WHERE \"container_expiration_policies\".\"project_id\" >= 16 AND \"container_expiration_policies\".\"project_id\" < 17")
-> 0.0004s
-- exec_query("SELECT \"container_expiration_policies\".\"project_id\" FROM \"container_expiration_policies\" WHERE \"container_expiration_policies\".\"project_id\" >= 17 ORDER BY \"container_expiration_policies\".\"project_id\" ASC LIMIT 1 OFFSET 1")
-> 0.0002s
-- execute("UPDATE \"container_expiration_policies\" SET \"name_regex_delete\" = \"container_expiration_policies\".\"name_regex\" WHERE \"container_expiration_policies\".\"project_id\" >= 17 AND \"container_expiration_policies\".\"project_id\" < 18")
-> 0.0010s
-- exec_query("SELECT \"container_expiration_policies\".\"project_id\" FROM \"container_expiration_policies\" WHERE \"container_expiration_policies\".\"project_id\" >= 18 ORDER BY \"container_expiration_policies\".\"project_id\" ASC LIMIT 1 OFFSET 1")
-> 0.0003s
-- execute("UPDATE \"container_expiration_policies\" SET \"name_regex_delete\" = \"container_expiration_policies\".\"name_regex\" WHERE \"container_expiration_policies\".\"project_id\" >= 18")
-> 0.0005s
-- indexes(:container_expiration_policies)
-> 0.0021s
-- foreign_keys(:container_expiration_policies)
-> 0.0025s
-- quote_table_name(:container_expiration_policies)
-> 0.0000s
-- quote_column_name(:name_regex)
-> 0.0000s
-- quote_column_name(:name_regex_delete)
-> 0.0000s
-- execute("CREATE OR REPLACE FUNCTION trigger_b45773e7702e()\nRETURNS trigger AS\n$BODY$\nBEGIN\n NEW.\"name_regex_delete\" := NEW.\"name_regex\";\n RETURN NEW;\nEND;\n$BODY$\nLANGUAGE 'plpgsql'\nVOLATILE\n")
-> 0.0033s
-- execute("DROP TRIGGER IF EXISTS trigger_b45773e7702e\nON \"container_expiration_policies\"\n")
-> 0.0002s
-- execute("CREATE TRIGGER trigger_b45773e7702e\nBEFORE INSERT OR UPDATE\nON \"container_expiration_policies\"\nFOR EACH ROW\nEXECUTE PROCEDURE trigger_b45773e7702e()\n")
-> 0.0007s
== 20200428044349 RenameContainerExpirationPoliciesNameRegexToNameRegexDelete: migrated (0.0518s)
Down Migration
== 20200428044349 RenameContainerExpirationPoliciesNameRegexToNameRegexDelete: reverting
-- execute("DROP TRIGGER IF EXISTS trigger_b45773e7702e ON container_expiration_policies")
-> 0.0009s
-- execute("DROP FUNCTION IF EXISTS trigger_b45773e7702e()")
-> 0.0004s
-- remove_column(:container_expiration_policies, :name_regex_delete)
-> 0.0005s
== 20200428044349 RenameContainerExpirationPoliciesNameRegexToNameRegexDelete: reverted (0.0037s)
CleanupContainerExpirationPoliciesNameRegexRename Migrations
Up Migration
== 20200428044451 CleanupContainerExpirationPoliciesNameRegexRename: migrating
-- execute("DROP TRIGGER IF EXISTS trigger_b45773e7702e ON container_expiration_policies")
-> 0.0021s
-- execute("DROP FUNCTION IF EXISTS trigger_b45773e7702e()")
-> 0.0005s
-- remove_column(:container_expiration_policies, :name_regex)
-> 0.0007s
== 20200428044451 CleanupContainerExpirationPoliciesNameRegexRename: migrated (0.0061s)
Down Migration
== 20200428044451 CleanupContainerExpirationPoliciesNameRegexRename: reverting
-- column_exists?(:container_expiration_policies, :project_id)
-> 0.0019s
-- transaction_open?()
-> 0.0000s
-- columns(:container_expiration_policies)
-> 0.0011s
-- add_column(:container_expiration_policies, :name_regex, :string, {:limit=>255, :precision=>nil, :scale=>nil})
-> 0.0009s
-- transaction_open?()
-> 0.0000s
-- exec_query("SELECT COUNT(*) AS count FROM \"container_expiration_policies\"")
-> 0.0006s
-- exec_query("SELECT \"container_expiration_policies\".\"project_id\" FROM \"container_expiration_policies\" ORDER BY \"container_expiration_policies\".\"project_id\" ASC LIMIT 1")
-> 0.0004s
-- exec_query("SELECT \"container_expiration_policies\".\"project_id\" FROM \"container_expiration_policies\" WHERE \"container_expiration_policies\".\"project_id\" >= 1 ORDER BY \"container_expiration_policies\".\"project_id\" ASC LIMIT 1 OFFSET 1")
-> 0.0003s
-- execute("UPDATE \"container_expiration_policies\" SET \"name_regex\" = \"container_expiration_policies\".\"name_regex_delete\" WHERE \"container_expiration_policies\".\"project_id\" >= 1 AND \"container_expiration_policies\".\"project_id\" < 2")
-> 0.0022s
-- exec_query("SELECT \"container_expiration_policies\".\"project_id\" FROM \"container_expiration_policies\" WHERE \"container_expiration_policies\".\"project_id\" >= 2 ORDER BY \"container_expiration_policies\".\"project_id\" ASC LIMIT 1 OFFSET 1")
-> 0.0003s
-- execute("UPDATE \"container_expiration_policies\" SET \"name_regex\" = \"container_expiration_policies\".\"name_regex_delete\" WHERE \"container_expiration_policies\".\"project_id\" >= 2 AND \"container_expiration_policies\".\"project_id\" < 3")
-> 0.0004s
-- exec_query("SELECT \"container_expiration_policies\".\"project_id\" FROM \"container_expiration_policies\" WHERE \"container_expiration_policies\".\"project_id\" >= 3 ORDER BY \"container_expiration_policies\".\"project_id\" ASC LIMIT 1 OFFSET 1")
-> 0.0002s
-- execute("UPDATE \"container_expiration_policies\" SET \"name_regex\" = \"container_expiration_policies\".\"name_regex_delete\" WHERE \"container_expiration_policies\".\"project_id\" >= 3 AND \"container_expiration_policies\".\"project_id\" < 4")
-> 0.0004s
-- exec_query("SELECT \"container_expiration_policies\".\"project_id\" FROM \"container_expiration_policies\" WHERE \"container_expiration_policies\".\"project_id\" >= 4 ORDER BY \"container_expiration_policies\".\"project_id\" ASC LIMIT 1 OFFSET 1")
-> 0.0002s
-- execute("UPDATE \"container_expiration_policies\" SET \"name_regex\" = \"container_expiration_policies\".\"name_regex_delete\" WHERE \"container_expiration_policies\".\"project_id\" >= 4 AND \"container_expiration_policies\".\"project_id\" < 5")
-> 0.0003s
-- exec_query("SELECT \"container_expiration_policies\".\"project_id\" FROM \"container_expiration_policies\" WHERE \"container_expiration_policies\".\"project_id\" >= 5 ORDER BY \"container_expiration_policies\".\"project_id\" ASC LIMIT 1 OFFSET 1")
-> 0.0002s
-- execute("UPDATE \"container_expiration_policies\" SET \"name_regex\" = \"container_expiration_policies\".\"name_regex_delete\" WHERE \"container_expiration_policies\".\"project_id\" >= 5 AND \"container_expiration_policies\".\"project_id\" < 6")
-> 0.0003s
-- exec_query("SELECT \"container_expiration_policies\".\"project_id\" FROM \"container_expiration_policies\" WHERE \"container_expiration_policies\".\"project_id\" >= 6 ORDER BY \"container_expiration_policies\".\"project_id\" ASC LIMIT 1 OFFSET 1")
-> 0.0002s
-- execute("UPDATE \"container_expiration_policies\" SET \"name_regex\" = \"container_expiration_policies\".\"name_regex_delete\" WHERE \"container_expiration_policies\".\"project_id\" >= 6 AND \"container_expiration_policies\".\"project_id\" < 7")
-> 0.0003s
-- exec_query("SELECT \"container_expiration_policies\".\"project_id\" FROM \"container_expiration_policies\" WHERE \"container_expiration_policies\".\"project_id\" >= 7 ORDER BY \"container_expiration_policies\".\"project_id\" ASC LIMIT 1 OFFSET 1")
-> 0.0002s
-- execute("UPDATE \"container_expiration_policies\" SET \"name_regex\" = \"container_expiration_policies\".\"name_regex_delete\" WHERE \"container_expiration_policies\".\"project_id\" >= 7 AND \"container_expiration_policies\".\"project_id\" < 8")
-> 0.0003s
-- exec_query("SELECT \"container_expiration_policies\".\"project_id\" FROM \"container_expiration_policies\" WHERE \"container_expiration_policies\".\"project_id\" >= 8 ORDER BY \"container_expiration_policies\".\"project_id\" ASC LIMIT 1 OFFSET 1")
-> 0.0002s
-- execute("UPDATE \"container_expiration_policies\" SET \"name_regex\" = \"container_expiration_policies\".\"name_regex_delete\" WHERE \"container_expiration_policies\".\"project_id\" >= 8 AND \"container_expiration_policies\".\"project_id\" < 9")
-> 0.0003s
-- exec_query("SELECT \"container_expiration_policies\".\"project_id\" FROM \"container_expiration_policies\" WHERE \"container_expiration_policies\".\"project_id\" >= 9 ORDER BY \"container_expiration_policies\".\"project_id\" ASC LIMIT 1 OFFSET 1")
-> 0.0002s
-- execute("UPDATE \"container_expiration_policies\" SET \"name_regex\" = \"container_expiration_policies\".\"name_regex_delete\" WHERE \"container_expiration_policies\".\"project_id\" >= 9 AND \"container_expiration_policies\".\"project_id\" < 10")
-> 0.0003s
-- exec_query("SELECT \"container_expiration_policies\".\"project_id\" FROM \"container_expiration_policies\" WHERE \"container_expiration_policies\".\"project_id\" >= 10 ORDER BY \"container_expiration_policies\".\"project_id\" ASC LIMIT 1 OFFSET 1")
-> 0.0002s
-- execute("UPDATE \"container_expiration_policies\" SET \"name_regex\" = \"container_expiration_policies\".\"name_regex_delete\" WHERE \"container_expiration_policies\".\"project_id\" >= 10 AND \"container_expiration_policies\".\"project_id\" < 11")
-> 0.0003s
-- exec_query("SELECT \"container_expiration_policies\".\"project_id\" FROM \"container_expiration_policies\" WHERE \"container_expiration_policies\".\"project_id\" >= 11 ORDER BY \"container_expiration_policies\".\"project_id\" ASC LIMIT 1 OFFSET 1")
-> 0.0002s
-- execute("UPDATE \"container_expiration_policies\" SET \"name_regex\" = \"container_expiration_policies\".\"name_regex_delete\" WHERE \"container_expiration_policies\".\"project_id\" >= 11 AND \"container_expiration_policies\".\"project_id\" < 12")
-> 0.0003s
-- exec_query("SELECT \"container_expiration_policies\".\"project_id\" FROM \"container_expiration_policies\" WHERE \"container_expiration_policies\".\"project_id\" >= 12 ORDER BY \"container_expiration_policies\".\"project_id\" ASC LIMIT 1 OFFSET 1")
-> 0.0002s
-- execute("UPDATE \"container_expiration_policies\" SET \"name_regex\" = \"container_expiration_policies\".\"name_regex_delete\" WHERE \"container_expiration_policies\".\"project_id\" >= 12 AND \"container_expiration_policies\".\"project_id\" < 13")
-> 0.0003s
-- exec_query("SELECT \"container_expiration_policies\".\"project_id\" FROM \"container_expiration_policies\" WHERE \"container_expiration_policies\".\"project_id\" >= 13 ORDER BY \"container_expiration_policies\".\"project_id\" ASC LIMIT 1 OFFSET 1")
-> 0.0002s
-- execute("UPDATE \"container_expiration_policies\" SET \"name_regex\" = \"container_expiration_policies\".\"name_regex_delete\" WHERE \"container_expiration_policies\".\"project_id\" >= 13 AND \"container_expiration_policies\".\"project_id\" < 14")
-> 0.0003s
-- exec_query("SELECT \"container_expiration_policies\".\"project_id\" FROM \"container_expiration_policies\" WHERE \"container_expiration_policies\".\"project_id\" >= 14 ORDER BY \"container_expiration_policies\".\"project_id\" ASC LIMIT 1 OFFSET 1")
-> 0.0003s
-- execute("UPDATE \"container_expiration_policies\" SET \"name_regex\" = \"container_expiration_policies\".\"name_regex_delete\" WHERE \"container_expiration_policies\".\"project_id\" >= 14 AND \"container_expiration_policies\".\"project_id\" < 15")
-> 0.0007s
-- exec_query("SELECT \"container_expiration_policies\".\"project_id\" FROM \"container_expiration_policies\" WHERE \"container_expiration_policies\".\"project_id\" >= 15 ORDER BY \"container_expiration_policies\".\"project_id\" ASC LIMIT 1 OFFSET 1")
-> 0.0003s
-- execute("UPDATE \"container_expiration_policies\" SET \"name_regex\" = \"container_expiration_policies\".\"name_regex_delete\" WHERE \"container_expiration_policies\".\"project_id\" >= 15 AND \"container_expiration_policies\".\"project_id\" < 16")
-> 0.0004s
-- exec_query("SELECT \"container_expiration_policies\".\"project_id\" FROM \"container_expiration_policies\" WHERE \"container_expiration_policies\".\"project_id\" >= 16 ORDER BY \"container_expiration_policies\".\"project_id\" ASC LIMIT 1 OFFSET 1")
-> 0.0003s
-- execute("UPDATE \"container_expiration_policies\" SET \"name_regex\" = \"container_expiration_policies\".\"name_regex_delete\" WHERE \"container_expiration_policies\".\"project_id\" >= 16 AND \"container_expiration_policies\".\"project_id\" < 17")
-> 0.0004s
-- exec_query("SELECT \"container_expiration_policies\".\"project_id\" FROM \"container_expiration_policies\" WHERE \"container_expiration_policies\".\"project_id\" >= 17 ORDER BY \"container_expiration_policies\".\"project_id\" ASC LIMIT 1 OFFSET 1")
-> 0.0002s
-- execute("UPDATE \"container_expiration_policies\" SET \"name_regex\" = \"container_expiration_policies\".\"name_regex_delete\" WHERE \"container_expiration_policies\".\"project_id\" >= 17 AND \"container_expiration_policies\".\"project_id\" < 18")
-> 0.0004s
-- exec_query("SELECT \"container_expiration_policies\".\"project_id\" FROM \"container_expiration_policies\" WHERE \"container_expiration_policies\".\"project_id\" >= 18 ORDER BY \"container_expiration_policies\".\"project_id\" ASC LIMIT 1 OFFSET 1")
-> 0.0002s
-- execute("UPDATE \"container_expiration_policies\" SET \"name_regex\" = \"container_expiration_policies\".\"name_regex_delete\" WHERE \"container_expiration_policies\".\"project_id\" >= 18")
-> 0.0004s
-- indexes(:container_expiration_policies)
-> 0.0019s
-- foreign_keys(:container_expiration_policies)
-> 0.0025s
-- quote_table_name(:container_expiration_policies)
-> 0.0000s
-- quote_column_name(:name_regex)
-> 0.0000s
-- quote_column_name(:name_regex_delete)
-> 0.0000s
-- execute("CREATE OR REPLACE FUNCTION trigger_b45773e7702e()\nRETURNS trigger AS\n$BODY$\nBEGIN\n NEW.\"name_regex_delete\" := NEW.\"name_regex\";\n RETURN NEW;\nEND;\n$BODY$\nLANGUAGE 'plpgsql'\nVOLATILE\n")
-> 0.0008s
-- execute("DROP TRIGGER IF EXISTS trigger_b45773e7702e\nON \"container_expiration_policies\"\n")
-> 0.0002s
-- execute("CREATE TRIGGER trigger_b45773e7702e\nBEFORE INSERT OR UPDATE\nON \"container_expiration_policies\"\nFOR EACH ROW\nEXECUTE PROCEDURE trigger_b45773e7702e()\n")
-> 0.0006s
== 20200428044451 CleanupContainerExpirationPoliciesNameRegexRename: reverted (0.0479s)
Screenshots
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides - [-] Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers - [-] Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
- [-] 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 #207267 (closed)