Module: kamailio
Branch: master
Commit: 91a81625f89da38e5890f3b3c84ed4141eb3652c
URL:
https://github.com/kamailio/kamailio/commit/91a81625f89da38e5890f3b3c84ed41…
Author: Juha Heinanen <jh(a)tutpro.com>
Committer: Juha Heinanen <jh(a)tutpro.com>
Date: 2017-04-15T17:39:39+03:00
srdb1/schema: made 'domain_attrs_domain_attrs_idx' index not unique
and removed 'value' field from the index
- generated sql files from schema
---
Modified: src/lib/srdb1/schema/domain_attrs.xml
Modified: utils/kamctl/db_sqlite/domain-create.sql
Modified: utils/kamctl/mysql/domain-create.sql
Modified: utils/kamctl/oracle/domain-create.sql
Modified: utils/kamctl/postgres/domain-create.sql
---
Diff:
https://github.com/kamailio/kamailio/commit/91a81625f89da38e5890f3b3c84ed41…
Patch:
https://github.com/kamailio/kamailio/commit/91a81625f89da38e5890f3b3c84ed41…
---
diff --git a/src/lib/srdb1/schema/domain_attrs.xml
b/src/lib/srdb1/schema/domain_attrs.xml
index 6f60781..0dedf38 100644
--- a/src/lib/srdb1/schema/domain_attrs.xml
+++ b/src/lib/srdb1/schema/domain_attrs.xml
@@ -65,7 +65,5 @@
<name>domain_attrs_idx</name>
<colref linkend="did"/>
<colref linkend="name"/>
- <colref linkend="value"/>
- <unique/>
</index>
</table>
diff --git a/utils/kamctl/db_sqlite/domain-create.sql
b/utils/kamctl/db_sqlite/domain-create.sql
index 5586eee..399e10e 100644
--- a/utils/kamctl/db_sqlite/domain-create.sql
+++ b/utils/kamctl/db_sqlite/domain-create.sql
@@ -14,9 +14,10 @@ CREATE TABLE domain_attrs (
name VARCHAR(32) NOT NULL,
type INTEGER NOT NULL,
value VARCHAR(255) NOT NULL,
- last_modified TIMESTAMP WITHOUT TIME ZONE DEFAULT '2000-01-01 00:00:01' NOT
NULL,
- CONSTRAINT domain_attrs_domain_attrs_idx UNIQUE (did, name, value)
+ last_modified TIMESTAMP WITHOUT TIME ZONE DEFAULT '2000-01-01 00:00:01' NOT
NULL
);
+CREATE INDEX domain_attrs_domain_attrs_idx ON domain_attrs (did, name);
+
INSERT INTO version (table_name, table_version) values
('domain_attrs','1');
diff --git a/utils/kamctl/mysql/domain-create.sql b/utils/kamctl/mysql/domain-create.sql
index 393fdab..44238e1 100644
--- a/utils/kamctl/mysql/domain-create.sql
+++ b/utils/kamctl/mysql/domain-create.sql
@@ -14,9 +14,10 @@ CREATE TABLE `domain_attrs` (
`name` VARCHAR(32) NOT NULL,
`type` INT UNSIGNED NOT NULL,
`value` VARCHAR(255) NOT NULL,
- `last_modified` DATETIME DEFAULT '2000-01-01 00:00:01' NOT NULL,
- CONSTRAINT domain_attrs_idx UNIQUE (`did`, `name`, `value`)
+ `last_modified` DATETIME DEFAULT '2000-01-01 00:00:01' NOT NULL
);
+CREATE INDEX domain_attrs_idx ON domain_attrs (`did`, `name`);
+
INSERT INTO version (table_name, table_version) values
('domain_attrs','1');
diff --git a/utils/kamctl/oracle/domain-create.sql
b/utils/kamctl/oracle/domain-create.sql
index ee1fe99..39e41a0 100644
--- a/utils/kamctl/oracle/domain-create.sql
+++ b/utils/kamctl/oracle/domain-create.sql
@@ -22,8 +22,7 @@ CREATE TABLE domain_attrs (
name VARCHAR2(32),
type NUMBER(10),
value VARCHAR2(255),
- last_modified DATE DEFAULT to_date('2000-01-01 00:00:01','yyyy-mm-dd
hh24:mi:ss'),
- CONSTRAINT domain_attrs_domain_attrs_idx UNIQUE (did, name, value)
+ last_modified DATE DEFAULT to_date('2000-01-01 00:00:01','yyyy-mm-dd
hh24:mi:ss')
);
CREATE OR REPLACE TRIGGER domain_attrs_tr
@@ -34,5 +33,7 @@ END domain_attrs_tr;
/
BEGIN map2users('domain_attrs'); END;
/
+CREATE INDEX domain_attrs_domain_attrs_idx ON domain_attrs (did, name);
+
INSERT INTO version (table_name, table_version) values
('domain_attrs','1');
diff --git a/utils/kamctl/postgres/domain-create.sql
b/utils/kamctl/postgres/domain-create.sql
index c358bdf..e4345ff 100644
--- a/utils/kamctl/postgres/domain-create.sql
+++ b/utils/kamctl/postgres/domain-create.sql
@@ -14,9 +14,10 @@ CREATE TABLE domain_attrs (
name VARCHAR(32) NOT NULL,
type INTEGER NOT NULL,
value VARCHAR(255) NOT NULL,
- last_modified TIMESTAMP WITHOUT TIME ZONE DEFAULT '2000-01-01 00:00:01' NOT
NULL,
- CONSTRAINT domain_attrs_domain_attrs_idx UNIQUE (did, name, value)
+ last_modified TIMESTAMP WITHOUT TIME ZONE DEFAULT '2000-01-01 00:00:01' NOT
NULL
);
+CREATE INDEX domain_attrs_domain_attrs_idx ON domain_attrs (did, name);
+
INSERT INTO version (table_name, table_version) values
('domain_attrs','1');