-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #64 from slr71/main
CORE-2016: added a conversion for the CPU hour addon
- Loading branch information
Showing
2 changed files
with
35 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
-- | ||
-- Deletes the add-on for cpu-hour-only subscriptions. | ||
-- | ||
|
||
BEGIN; | ||
|
||
SET search_path = public, pg_catalog; | ||
|
||
DELETE FROM addons WHERE id = 'f8d2066c-e3b2-4559-839e-88bfc997c89f'; | ||
|
||
COMMIT; |
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,24 @@ | ||
-- | ||
-- Creates an add-on for cpu-hour-only subscriptions. | ||
-- | ||
|
||
BEGIN; | ||
|
||
SET search_path = public, pg_catalog; | ||
|
||
INSERT INTO addons (id, name, description, resource_type_id, default_amount, default_paid) | ||
VALUES ( | ||
'f8d2066c-e3b2-4559-839e-88bfc997c89f', | ||
'5000 CPU Hours', | ||
'5000 CPU Hours to be used before the current subscription ends..', | ||
(SELECT id FROM resource_types WHERE name = 'cpu.hours'), | ||
5000, | ||
TRUE | ||
) | ||
ON CONFLICT DO NOTHING; | ||
|
||
INSERT INTO addon_rates (id, addon_id, effective_date, rate) VALUES | ||
('672e49af-b7b7-4a0e-a929-00f4a1c5e7f2', 'f8d2066c-e3b2-4559-839e-88bfc997c89f', '2025-01-01', 100.00) | ||
ON CONFLICT (id) DO NOTHING; | ||
|
||
COMMIT; |