Skip to content

Commit

Permalink
Merge pull request #64 from slr71/main
Browse files Browse the repository at this point in the history
CORE-2016: added a conversion for the CPU hour addon
  • Loading branch information
slr71 authored Jan 23, 2025
2 parents 20f9dc4 + ede00c7 commit bcfade9
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
11 changes: 11 additions & 0 deletions migrations/000016_cpu_hour_addon.down.sql
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;
24 changes: 24 additions & 0 deletions migrations/000016_cpu_hour_addon.up.sql
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;

0 comments on commit bcfade9

Please sign in to comment.