Skip to content

Commit

Permalink
Fixed missing column in cc_agents table defintion
Browse files Browse the repository at this point in the history
Credits go to @Shkiperon

Closes #2130
Closes #2127
  • Loading branch information
bogdan-iancu committed Jun 2, 2020
1 parent 7a50807 commit bf2023e
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 3 deletions.
11 changes: 11 additions & 0 deletions db/schema/cc_agents.xml
Expand Up @@ -83,6 +83,17 @@
</description>
</column>

<column id="wrapup_time">
<name>wrapup_time</name>
<type>int</type>
<size>11</size>
<default>0</default>
<description>The duration in seconds needed by the agent to wrap
up the call he just completed. If set to 0, the global wraptup time
will be used for this agent.
</description>
</column>

<index>
<name>unique_agentid</name>
<colref linkend="agentid"/>
Expand Down
4 changes: 2 additions & 2 deletions scripts/db_berkeley/opensips/cc_agents
@@ -1,10 +1,10 @@
METADATA_COLUMNS
id(int) agentid(str) location(str) logstate(int) skills(str) wrapup_end_time(int)
id(int) agentid(str) location(str) logstate(int) skills(str) wrapup_end_time(int) wrapup_time(int)
METADATA_KEY

METADATA_READONLY
0
METADATA_LOGFLAGS
0
METADATA_DEFAULTS
NIL|NIL|NIL|0|NIL|0
NIL|NIL|NIL|0|NIL|0|0
2 changes: 1 addition & 1 deletion scripts/dbtext/opensips/cc_agents
@@ -1 +1 @@
id(int,auto) agentid(string) location(string) logstate(int) skills(string) wrapup_end_time(int)
id(int,auto) agentid(string) location(string) logstate(int) skills(string) wrapup_end_time(int) wrapup_time(int)
1 change: 1 addition & 0 deletions scripts/mysql/call_center-create.sql
Expand Up @@ -25,6 +25,7 @@ CREATE TABLE cc_agents (
logstate INT(10) UNSIGNED DEFAULT 0 NOT NULL,
skills CHAR(255) NOT NULL,
wrapup_end_time INT(11) DEFAULT 0 NOT NULL,
wrapup_time INT(11) DEFAULT 0 NOT NULL,
CONSTRAINT unique_agentid UNIQUE (agentid)
) ENGINE=InnoDB;

Expand Down
1 change: 1 addition & 0 deletions scripts/oracle/call_center-create.sql
Expand Up @@ -33,6 +33,7 @@ CREATE TABLE cc_agents (
logstate NUMBER(10) DEFAULT 0 NOT NULL,
skills VARCHAR2(255),
wrapup_end_time NUMBER(10) DEFAULT 0 NOT NULL,
wrapup_time NUMBER(10) DEFAULT 0 NOT NULL,
CONSTRAINT cc_agents_unique_agentid UNIQUE (agentid)
);

Expand Down
3 changes: 3 additions & 0 deletions scripts/pi_http/call_center-mod
Expand Up @@ -81,6 +81,7 @@
<col><field>logstate</field></col>
<col><field>skills</field></col>
<col><field>wrapup_end_time</field></col>
<col><field>wrapup_time</field></col>
</query_cols>
</cmd>
<cmd><cmd_name>add</cmd_name>
Expand All @@ -92,6 +93,7 @@
<col><field>logstate</field></col>
<col><field>skills</field></col>
<col><field>wrapup_end_time</field></col>
<col><field>wrapup_time</field></col>
</query_cols>
</cmd>
<cmd><cmd_name>update</cmd_name>
Expand All @@ -106,6 +108,7 @@
<col><field>logstate</field></col>
<col><field>skills</field></col>
<col><field>wrapup_end_time</field></col>
<col><field>wrapup_time</field></col>
</query_cols>
</cmd>
<cmd><cmd_name>delete</cmd_name>
Expand Down
1 change: 1 addition & 0 deletions scripts/pi_http/call_center-table
Expand Up @@ -27,6 +27,7 @@
<column><field>logstate</field><type>DB_INT</type></column>
<column><field>skills</field><type>DB_STR</type></column>
<column><field>wrapup_end_time</field><type>DB_INT</type></column>
<column><field>wrapup_time</field><type>DB_INT</type></column>
</db_table>
<!-- Declaration of cc_cdrs table-->
<db_table id="cc_cdrs">
Expand Down
4 changes: 4 additions & 0 deletions scripts/pi_http/pi_framework.xml
Expand Up @@ -287,6 +287,7 @@
<column><field>logstate</field><type>DB_INT</type></column>
<column><field>skills</field><type>DB_STR</type></column>
<column><field>wrapup_end_time</field><type>DB_INT</type></column>
<column><field>wrapup_time</field><type>DB_INT</type></column>
</db_table>
<!-- Declaration of cc_cdrs table-->
<db_table id="cc_cdrs">
Expand Down Expand Up @@ -2039,6 +2040,7 @@
<col><field>logstate</field></col>
<col><field>skills</field></col>
<col><field>wrapup_end_time</field></col>
<col><field>wrapup_time</field></col>
</query_cols>
</cmd>
<cmd><cmd_name>add</cmd_name>
Expand All @@ -2050,6 +2052,7 @@
<col><field>logstate</field></col>
<col><field>skills</field></col>
<col><field>wrapup_end_time</field></col>
<col><field>wrapup_time</field></col>
</query_cols>
</cmd>
<cmd><cmd_name>update</cmd_name>
Expand All @@ -2064,6 +2067,7 @@
<col><field>logstate</field></col>
<col><field>skills</field></col>
<col><field>wrapup_end_time</field></col>
<col><field>wrapup_time</field></col>
</query_cols>
</cmd>
<cmd><cmd_name>delete</cmd_name>
Expand Down
1 change: 1 addition & 0 deletions scripts/postgres/call_center-create.sql
Expand Up @@ -26,6 +26,7 @@ CREATE TABLE cc_agents (
logstate INTEGER DEFAULT 0 NOT NULL,
skills VARCHAR(255) NOT NULL,
wrapup_end_time INTEGER DEFAULT 0 NOT NULL,
wrapup_time INTEGER DEFAULT 0 NOT NULL,
CONSTRAINT cc_agents_unique_agentid UNIQUE (agentid)
);

Expand Down
1 change: 1 addition & 0 deletions scripts/sqlite/call_center-create.sql
Expand Up @@ -25,6 +25,7 @@ CREATE TABLE cc_agents (
logstate INTEGER DEFAULT 0 NOT NULL,
skills CHAR(255) NOT NULL,
wrapup_end_time INTEGER DEFAULT 0 NOT NULL,
wrapup_time INTEGER DEFAULT 0 NOT NULL,
CONSTRAINT cc_agents_unique_agentid UNIQUE (agentid)
);

Expand Down

0 comments on commit bf2023e

Please sign in to comment.