Skip to content

Commit

Permalink
Merge pull request #1297 from joselsegura/add_rule_id_column_advisor_…
Browse files Browse the repository at this point in the history
…ratings

Add rule id column advisor ratings
  • Loading branch information
joselsegura authored Oct 20, 2021
2 parents 6cc54c2 + 8ab67c6 commit eb4ba52
Show file tree
Hide file tree
Showing 21 changed files with 896 additions and 207 deletions.
4 changes: 2 additions & 2 deletions config-devel.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ org_allowlist_file = "org_allowlist.csv"

[storage]
db_driver = "postgres"
pg_username = "user"
pg_password = "password"
pg_username = "postgres"
pg_password = "postgres"
pg_host = "localhost"
pg_port = 5432
pg_db_name = "aggregator"
Expand Down
28 changes: 25 additions & 3 deletions docs/db-description/aggregator.public.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,20 @@
<table name="advisor_ratings" numRows="0" remarks="" schema="public" type="TABLE">
<column autoUpdated="false" defaultValue="null" digits="0" id="0" name="user_id" nullable="false" remarks="" size="2147483647" type="varchar" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="1" name="org_id" nullable="false" remarks="" size="2147483647" type="varchar" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="2" name="rule_id" nullable="false" remarks="" size="2147483647" type="varchar" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="2" name="rule_fqdn" nullable="false" remarks="" size="2147483647" type="varchar" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="3" name="error_key" nullable="false" remarks="" size="2147483647" type="varchar" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="6" id="4" name="rated_at" nullable="true" remarks="" size="29" type="timestamp" typeCode="93"/>
<column autoUpdated="false" defaultValue="null" digits="6" id="5" name="last_updated_at" nullable="true" remarks="" size="29" type="timestamp" typeCode="93"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="6" name="rating" nullable="true" remarks="" size="5" type="int2" typeCode="5"/>
<column autoUpdated="false" defaultValue="'.'::character varying" digits="0" id="7" name="rule_id" nullable="false" remarks="" size="2147483647" type="varchar" typeCode="12"/>
<primaryKey column="user_id" sequenceNumberInPK="1"/>
<primaryKey column="org_id" sequenceNumberInPK="2"/>
<primaryKey column="rule_id" sequenceNumberInPK="3"/>
<primaryKey column="rule_fqdn" sequenceNumberInPK="3"/>
<primaryKey column="error_key" sequenceNumberInPK="4"/>
<index name="advisor_ratings_pkey" unique="true">
<column ascending="true" name="user_id"/>
<column ascending="true" name="org_id"/>
<column ascending="true" name="rule_id"/>
<column ascending="true" name="rule_fqdn"/>
<column ascending="true" name="error_key"/>
</index>
</table>
Expand Down Expand Up @@ -106,6 +107,8 @@
<column autoUpdated="false" defaultValue="null" digits="0" id="1" name="cluster_id" nullable="false" remarks="" size="2147483647" type="varchar" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="2" name="rule_fqdn" nullable="false" remarks="" size="2147483647" type="text" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="3" name="error_key" nullable="false" remarks="" size="2147483647" type="varchar" typeCode="12"/>
<column autoUpdated="false" defaultValue="'.'::character varying" digits="0" id="4" name="rule_id" nullable="false" remarks="" size="2147483647" type="varchar" typeCode="12"/>
<column autoUpdated="false" defaultValue="timezone('utc'::text, now())" digits="6" id="5" name="created_at" nullable="true" remarks="" size="29" type="timestamp" typeCode="93"/>
<primaryKey column="org_id" sequenceNumberInPK="1"/>
<primaryKey column="cluster_id" sequenceNumberInPK="2"/>
<primaryKey column="rule_fqdn" sequenceNumberInPK="3"/>
Expand Down Expand Up @@ -139,6 +142,25 @@
<column ascending="true" name="kafka_offset"/>
</index>
</table>
<table name="rule_disable" numRows="0" remarks="" schema="public" type="TABLE">
<column autoUpdated="false" defaultValue="null" digits="0" id="0" name="org_id" nullable="false" remarks="" size="2147483647" type="varchar" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="1" name="user_id" nullable="false" remarks="" size="2147483647" type="varchar" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="2" name="rule_id" nullable="false" remarks="" size="2147483647" type="varchar" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="3" name="error_key" nullable="false" remarks="" size="2147483647" type="varchar" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="4" name="justification" nullable="true" remarks="" size="2147483647" type="varchar" typeCode="12"/>
<column autoUpdated="false" defaultValue="null" digits="6" id="5" name="created_at" nullable="false" remarks="" size="29" type="timestamp" typeCode="93"/>
<column autoUpdated="false" defaultValue="null" digits="6" id="6" name="updated_at" nullable="true" remarks="" size="29" type="timestamp" typeCode="93"/>
<primaryKey column="user_id" sequenceNumberInPK="1"/>
<primaryKey column="org_id" sequenceNumberInPK="2"/>
<primaryKey column="rule_id" sequenceNumberInPK="3"/>
<primaryKey column="error_key" sequenceNumberInPK="4"/>
<index name="rule_disable_pkey" unique="true">
<column ascending="true" name="user_id"/>
<column ascending="true" name="org_id"/>
<column ascending="true" name="rule_id"/>
<column ascending="true" name="error_key"/>
</index>
</table>
<table name="rule_hit" numRows="0" remarks="" schema="public" type="TABLE">
<column autoUpdated="false" defaultValue="null" digits="0" id="0" name="org_id" nullable="false" remarks="" size="10" type="int4" typeCode="4"/>
<column autoUpdated="false" defaultValue="null" digits="0" id="1" name="cluster_id" nullable="false" remarks="" size="2147483647" type="varchar" typeCode="12"/>
Expand Down
Loading

0 comments on commit eb4ba52

Please sign in to comment.