-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into depfu/update/active_model_serializers-0.10.14
- Loading branch information
Showing
44 changed files
with
11,877 additions
and
16,692 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
# rubocop:disable Style/NumericLiterals | ||
unless Rails.env.production? | ||
StrongMigrations.start_after = 20200205123840 | ||
StrongMigrations.lock_timeout_limit = 0 | ||
end | ||
# rubocop:enable Style/NumericLiterals |
This file was deleted.
Oops, something went wrong.
23 changes: 12 additions & 11 deletions
23
db/migrate/20230814105634_move_hw_info_to_systems_table.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,21 @@ | ||
class MoveHwInfoToSystemsTable < ActiveRecord::Migration[6.1] | ||
def up | ||
safety_assured do | ||
execute "update systems as s inner join hw_infos hw on s.id=hw.system_id \ | ||
set system_information = json_object(\ | ||
'cpus', hw.cpus, \ | ||
'sockets', hw.sockets, \ | ||
'hypervisor', nullif(hw.hypervisor, ''), \ | ||
'arch', nullif(hw.arch, ''), \ | ||
'uuid', nullif(hw.uuid, ''), \ | ||
'cloud_provider', nullif(hw.cloud_provider, ''));" | ||
change_column :systems, :instance_data, :text | ||
|
||
execute "UPDATE systems AS s INNER JOIN hw_infos hw ON s.id=hw.system_id \ | ||
SET s.system_information = json_object( \ | ||
'cpus', hw.cpus, \ | ||
'sockets', hw.sockets, \ | ||
'hypervisor', nullif(hw.hypervisor, ''), \ | ||
'arch', nullif(hw.arch, ''), \ | ||
'uuid', nullif(hw.uuid, ''), \ | ||
'cloud_provider', nullif(hw.cloud_provider, '')), \ | ||
s.instance_data = hw.instance_data;" | ||
end | ||
end | ||
|
||
def down | ||
safety_assured do | ||
execute 'update systems set system_information = json_object();' | ||
end | ||
change_column :systems, :instance_data, :string | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.