-
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.
added a conversion for the data add-on
- Loading branch information
Showing
2 changed files
with
31 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 data-only subscriptions. | ||
-- | ||
|
||
BEGIN; | ||
|
||
SET search_path = public, pg_catalog; | ||
|
||
DELETE FROM addons WHERE id = 'c21dd61f-aa41-40ad-8005-859679ceed9c'; | ||
|
||
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,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; |