Skip to content

Commit

Permalink
added a conversion for the data add-on
Browse files Browse the repository at this point in the history
  • Loading branch information
slr71 committed Apr 20, 2023
1 parent 73b86d9 commit 60e8ba1
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
11 changes: 11 additions & 0 deletions migrations/000012_data_addon.down.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--
-- Deletes the add-on for data-only subscriptions.
--

BEGIN;

SET search_path = public, pg_catalog;

DELETE FROM addons WHERE id = 'c21dd61f-aa41-40ad-8005-859679ceed9c';

COMMIT;
20 changes: 20 additions & 0 deletions migrations/000012_data_addon.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
--
-- Creates an add-on for data-only subscriptions.
--

BEGIN;

SET search_path = public, pg_catalog;

INSERT INTO addons (id, name, description, resource_type_id, default_amount, default_paid)
VALUES (
'c21dd61f-aa41-40ad-8005-859679ceed9c',
'1 TB',
'1 TB of data storage for one year.',
(SELECT id FROM resource_types WHERE name = 'data.size'),
power(2, 40),
TRUE
)
ON CONFLICT DO NOTHING;

COMMIT;

0 comments on commit 60e8ba1

Please sign in to comment.