-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
backend: Add instance statistics table
- Loading branch information
Showing
4 changed files
with
302 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
backend/pkg/api/db/migrations/0019_add_instance_stats_table.sql
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,14 @@ | ||
-- +migrate Up | ||
|
||
create table if not exists instance_stats ( | ||
timestamp timestamptz not null, | ||
channel_name varchar(25) not null, | ||
arch varchar(7) not null, | ||
version varchar(255) not null, | ||
instances int not null check (instances >= 0), | ||
unique(timestamp, channel_name, arch, version) | ||
); | ||
|
||
-- +migrate Down | ||
|
||
drop table if exists instance_stats; |
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
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