Skip to content

Commit

Permalink
Merge pull request #58 from slr71/main
Browse files Browse the repository at this point in the history
added a conversion for the data add-on
  • Loading branch information
slr71 authored Apr 20, 2023
2 parents 73b86d9 + 60e8ba1 commit 8e24552
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 8e24552

Please sign in to comment.