generated from dxw/rails-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(crm): updating precision in support case columns
- Loading branch information
1 parent
5fa08b1
commit ea3877a
Showing
9 changed files
with
83 additions
and
38 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
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
21 changes: 21 additions & 0 deletions
21
db/migrate/20240903101832_update_precision_in_support_cases.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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
class UpdatePrecisionInSupportCases < ActiveRecord::Migration[7.1] | ||
def up | ||
execute "DROP VIEW IF EXISTS support_tower_cases CASCADE;" | ||
change_column :support_cases, :value, :decimal, precision: 10, scale: 2 | ||
change_column :support_contracts, :spend, :decimal, precision: 10, scale: 2 | ||
change_column :support_cases, :savings_estimate, :decimal, precision: 10, scale: 2 | ||
change_column :support_cases, :savings_actual, :decimal, precision: 10, scale: 2 | ||
create_view :support_tower_cases, version: 4 | ||
create_view :support_case_data, version: 11 | ||
end | ||
|
||
def down | ||
execute "DROP VIEW IF EXISTS support_tower_cases CASCADE;" | ||
change_column :support_cases, :savings_actual, :decimal, precision: 9, scale: 2 | ||
change_column :support_contracts, :spend, :decimal, precision: 9, scale: 2 | ||
change_column :support_cases, :savings_estimate, :decimal, precision: 9, scale: 2 | ||
change_column :support_cases, :savings_actual, :decimal, precision: 9, scale: 2 | ||
create_view :support_tower_cases, version: 4 | ||
create_view :support_case_data, version: 11 | ||
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