gitlab-org--gitlab-foss/lib/gitlab/database
Yorick Peterse 5eab624d3c
Improve migrations using triggers
This adds a bunch of checks to migrations that may create or drop
triggers. Dropping triggers/functions is done using "IF EXISTS" so we
don't throw an error if the object in question has already been dropped.
We now also raise a custom error (message) when the user does not have
TRIGGER privileges. This should prevent the schema from entering an
inconsistent state while also providing the user with enough information
on how to solve the problem.

The recommendation of using SUPERUSER permissions is a bit extreme but
we require this anyway (Omnibus also configures users with this
permission).

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/36633
2017-08-29 13:02:44 +02:00
..
rename_reserved_paths_migration Support multiple Redis instances based on queue type 2017-07-11 03:35:47 +00:00
date_time.rb fixing spec failures 2016-11-17 08:22:55 +01:00
grant.rb Improve migrations using triggers 2017-08-29 13:02:44 +02:00
median.rb Enable Style/DotPosition Rubocop 👮 2017-06-21 13:48:12 +00:00
migration_helpers.rb Improve migrations using triggers 2017-08-29 13:02:44 +02:00
multi_threaded_migration.rb Prepare for zero downtime migrations 2017-04-12 18:15:19 +02:00
sha_attribute.rb Added code for defining SHA attributes 2017-06-29 15:37:37 +02:00