2018-11-20 20:34:42 +01:00
|
|
|
---
|
|
|
|
id: database_schema
|
|
|
|
title: Database Schema
|
|
|
|
---
|
|
|
|
|
2019-03-05 09:26:34 +01:00
|
|
|
This document describes our current database schema used in PostgreSQL. We use db-migrate to migrate (create tables, add columns, etc.) the database.
|
2016-09-16 14:59:31 +02:00
|
|
|
|
2016-07-02 16:25:30 +02:00
|
|
|
## Table: _migrations_
|
|
|
|
|
2018-11-22 11:20:28 +01:00
|
|
|
Used by db-migrate module to keep track of migrations.
|
2016-07-02 16:25:30 +02:00
|
|
|
|
2020-08-06 11:18:52 +02:00
|
|
|
| NAME | TYPE | SIZE | NULLABLE | COLUMN_DEF |
|
|
|
|
| --- | --- | --- | --- | --- |
|
|
|
|
| id | serial | 10 | 0 | nextval('migrations_id_seq'::regclass) |
|
|
|
|
| name | varchar | 255 | 0 | (null) |
|
|
|
|
| run_on | timestamp | 29 | 0 | (null) |
|
2016-07-02 16:25:30 +02:00
|
|
|
|
|
|
|
## Table: _events_
|
|
|
|
|
2020-08-06 11:18:52 +02:00
|
|
|
| NAME | TYPE | SIZE | NULLABLE | COLUMN_DEF |
|
|
|
|
| --- | --- | --- | --- | --- |
|
|
|
|
| id | serial | 10 | 0 | nextval('events_id_seq'::regclass) |
|
|
|
|
| created_at | timestamp | 29 | 1 | now() |
|
|
|
|
| type | varchar | 255 | 0 | (null) |
|
|
|
|
| created_by | varchar | 255 | 0 | (null) |
|
|
|
|
| data | json | 2147483647 | 1 | (null) |
|
2016-07-02 16:25:30 +02:00
|
|
|
|
2016-09-16 14:59:31 +02:00
|
|
|
## Table: _strategies_
|
2016-07-02 16:25:30 +02:00
|
|
|
|
2018-11-22 11:20:28 +01:00
|
|
|
| NAME | TYPE | SIZE | NULLABLE | COLUMN_DEF |
|
|
|
|
| ------------------- | --------- | ---------- | -------- | ---------- |
|
|
|
|
| created_at | timestamp | 29 | 1 | now() |
|
|
|
|
| name | varchar | 255 | 0 | (null) |
|
|
|
|
| description | text | 2147483647 | 1 | (null) |
|
|
|
|
| parameters_template | json | 2147483647 | 1 | (null) |
|
2016-07-02 16:25:30 +02:00
|
|
|
|
|
|
|
## Table: _features_
|
|
|
|
|
2020-08-06 11:18:52 +02:00
|
|
|
| **NAME** | **TYPE** | **SIZE** | **NULLABLE** | **COLUMN_DEF** | **COMMENT** |
|
|
|
|
| --- | --- | --- | --- | --- | --- |
|
|
|
|
| created_at | timestamp | 29 | 1 | now() | |
|
|
|
|
| name | varchar | 255 | 0 | (null) | |
|
|
|
|
| enabled | int4 | 10 | 1 | 0 | |
|
|
|
|
| description | text | 2147483647 | 1 | (null) | |
|
|
|
|
| archived | int4 | 10 | 1 | 0 | |
|
|
|
|
| strategies | json | 2147483647 | 1 | (null) | |
|
|
|
|
| type | varchar | 2147483647 | 1 | release | |
|
2016-11-30 21:46:40 +01:00
|
|
|
|
|
|
|
## Table: _client_strategies_
|
|
|
|
|
2018-11-22 11:20:28 +01:00
|
|
|
| COLUMN_NAME | TYPE_NAME | COLUMN_SIZE | NULLABLE | COLUMN_DEF |
|
|
|
|
| ----------- | --------- | ----------- | -------- | ---------- |
|
|
|
|
| app_name | varchar | 255 | 0 | (null) |
|
|
|
|
| updated_at | timestamp | 29 | 1 | now() |
|
2016-11-30 21:46:40 +01:00
|
|
|
| strategies | json | 2147483647 | 1 | (null) |
|
|
|
|
|
|
|
|
## Table: _client_instances_
|
|
|
|
|
|
|
|
| COLUMN_NAME | TYPE_NAME | COLUMN_SIZE | NULLABLE | COLUMN_DEF |
|
|
|
|
| ----------- | --------- | ----------- | -------- | ---------- |
|
|
|
|
| app_name | varchar | 255 | 1 | (null) |
|
|
|
|
| instance_id | varchar | 255 | 1 | (null) |
|
|
|
|
| client_ip | varchar | 255 | 1 | (null) |
|
|
|
|
| last_seen | timestamp | 29 | 1 | now() |
|
|
|
|
| created_at | timestamp | 29 | 1 | now() |
|
|
|
|
|
|
|
|
## Table: _client_metrics_
|
|
|
|
|
2020-08-06 11:18:52 +02:00
|
|
|
| COLUMN_NAME | TYPE_NAME | COLUMN_SIZE | NULLABLE | COLUMN_DEF |
|
|
|
|
| --- | --- | --- | --- | --- |
|
|
|
|
| id | serial | 10 | 0 | nextval('client_metrics_id_seq'::regclass) |
|
|
|
|
| created_at | timestamp | 29 | 1 | now() |
|
|
|
|
| metrics | json | 2147483647 | 1 | (null) |
|
|
|
|
|
|
|
|
## Table: _feature_types_
|
|
|
|
|
|
|
|
| COLUMN_NAME | TYPE_NAME | COLUMN_SIZE | NULLABLE | COLUMN_DEF |
|
|
|
|
| ------------- | --------- | ----------- | -------- | ---------- |
|
|
|
|
| id | varchar | 255 | 0 | (null) |
|
|
|
|
| name | varchar | | 0 | (null) |
|
|
|
|
| description | varchar | | 1 | (null) |
|
|
|
|
| lifetime_days | integer | | 1 | (null) |
|