Skip to content

Commit

Permalink
feat: implement usage tracker + quotas
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenfiszel committed Dec 11, 2022
1 parent e4d61ee commit fd87109
Show file tree
Hide file tree
Showing 33 changed files with 913 additions and 706 deletions.
1 change: 1 addition & 0 deletions backend/migrations/20221210194626_usage_tracker.down.sql
@@ -0,0 +1 @@
-- Add down migration script here
8 changes: 8 additions & 0 deletions backend/migrations/20221210194626_usage_tracker.up.sql
@@ -0,0 +1,8 @@
-- Add up migration script here
CREATE TABLE usage (
id VARCHAR(50) NOT NULL,
is_workspace BOOLEAN NOT NULL,
month_ INTEGER NOT NULL,
usage INTEGER NOT NULL,
PRIMARY KEY (id, is_workspace, month_)
);
5 changes: 5 additions & 0 deletions backend/migrations/20221211055346_emails_everywhere.down.sql
@@ -0,0 +1,5 @@
-- Add down migration script here
ALTER TABLE queue DROP COLUMN email;
ALTER TABLE workspace_settings DROP COLUMN slack_email;
ALTER TABLE schedule DROP COLUMN email;
ALTER TABLE schedule DROP COLUMN error;
6 changes: 6 additions & 0 deletions backend/migrations/20221211055346_emails_everywhere.up.sql
@@ -0,0 +1,6 @@
-- Add up migration script here
ALTER TABLE queue ADD COLUMN email VARCHAR(50) NOT NULL DEFAULT 'missing@email.xyz';
ALTER TABLE workspace_settings ADD COLUMN slack_email VARCHAR(50) NOT NULL DEFAULT 'missing@email.xyz';;
ALTER TABLE schedule ADD COLUMN email VARCHAR(50) NOT NULL DEFAULT 'missing@email.xyz';
ALTER TABLE schedule ADD COLUMN error TEXT;

0 comments on commit fd87109

Please sign in to comment.