diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2017-04-26 15:01:23 -0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2017-04-26 17:06:15 -0300 |
commit | 8c9e3168b6365e909396bf9877fdaf2e01883ce1 (patch) | |
tree | 22557487593629095674371eb1d2567eb96e80a3 /db | |
parent | 2b4361a66e964cc1c895be494b4c2c99cc4a8d6a (diff) | |
download | gitlab-ce-8c9e3168b6365e909396bf9877fdaf2e01883ce1.tar.gz |
Fill missing uuid on the application_settings table2246-uuid-is-nil-for-new-installation
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20170426175636_fill_missing_uuid_on_application_settings.rb | 10 | ||||
-rw-r--r-- | db/schema.rb | 2 |
2 files changed, 11 insertions, 1 deletions
diff --git a/db/migrate/20170426175636_fill_missing_uuid_on_application_settings.rb b/db/migrate/20170426175636_fill_missing_uuid_on_application_settings.rb new file mode 100644 index 00000000000..58ad2c64075 --- /dev/null +++ b/db/migrate/20170426175636_fill_missing_uuid_on_application_settings.rb @@ -0,0 +1,10 @@ +class FillMissingUuidOnApplicationSettings < ActiveRecord::Migration + DOWNTIME = false + + def up + execute("UPDATE application_settings SET uuid = #{quote(SecureRandom.uuid)} WHERE uuid is NULL") + end + + def down + end +end diff --git a/db/schema.rb b/db/schema.rb index ff00951d5f6..49d7c996661 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20170424142900) do +ActiveRecord::Schema.define(version: 20170426175636) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" |