Module: sip-router
Branch: master
Commit: 279fe72dbe9009aa9e73d7609460d4dc613bfa6d
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=279fe72…
Author: Juha Heinanen <jh(a)tutpro.com>
Committer: Juha Heinanen <jh(a)tutpro.com>
Date: Sun Sep 16 17:14:18 2012 +0300
lib/srdb1/schema: added expires_idx on location table
---
lib/srdb1/schema/location.xml | 6 +++++-
utils/kamctl/db_sqlite/usrloc-create.sql | 1 +
utils/kamctl/mysql/usrloc-create.sql | 1 +
utils/kamctl/oracle/usrloc-create.sql | 1 +
utils/kamctl/postgres/usrloc-create.sql | 1 +
5 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/lib/srdb1/schema/location.xml b/lib/srdb1/schema/location.xml
index add435b..be92306 100644
--- a/lib/srdb1/schema/location.xml
+++ b/lib/srdb1/schema/location.xml
@@ -80,7 +80,7 @@
<description>Path Header(s) per RFC 3327</description>
</column>
- <column>
+ <column id="expires">
<name>expires</name>
<type>datetime</type>
<default>&DEFAULT_ALIASES_EXPIRES;</default>
@@ -191,6 +191,10 @@
<colref linkend="ruid"/>
<unique/>
</index>
+ <index>
+ <name>expires_idx</name>
+ <colref linkend="expires"/>
+ </index>
</table>
diff --git a/utils/kamctl/db_sqlite/usrloc-create.sql
b/utils/kamctl/db_sqlite/usrloc-create.sql
index ee86dd0..9b3f781 100644
--- a/utils/kamctl/db_sqlite/usrloc-create.sql
+++ b/utils/kamctl/db_sqlite/usrloc-create.sql
@@ -23,4 +23,5 @@ CREATE TABLE location (
);
CREATE INDEX location_account_contact_idx ON location (username, domain, contact);
+CREATE INDEX location_expires_idx ON location (expires);
diff --git a/utils/kamctl/mysql/usrloc-create.sql b/utils/kamctl/mysql/usrloc-create.sql
index 4823757..f87e711 100644
--- a/utils/kamctl/mysql/usrloc-create.sql
+++ b/utils/kamctl/mysql/usrloc-create.sql
@@ -23,4 +23,5 @@ CREATE TABLE location (
) ENGINE=MyISAM;
CREATE INDEX account_contact_idx ON location (username, domain, contact);
+CREATE INDEX expires_idx ON location (expires);
diff --git a/utils/kamctl/oracle/usrloc-create.sql
b/utils/kamctl/oracle/usrloc-create.sql
index 35798f5..9331770 100644
--- a/utils/kamctl/oracle/usrloc-create.sql
+++ b/utils/kamctl/oracle/usrloc-create.sql
@@ -31,4 +31,5 @@ END location_tr;
BEGIN map2users('location'); END;
/
CREATE INDEX location_account_contact_idx ON location (username, domain, contact);
+CREATE INDEX location_expires_idx ON location (expires);
diff --git a/utils/kamctl/postgres/usrloc-create.sql
b/utils/kamctl/postgres/usrloc-create.sql
index 9998d86..eb2b675 100644
--- a/utils/kamctl/postgres/usrloc-create.sql
+++ b/utils/kamctl/postgres/usrloc-create.sql
@@ -23,4 +23,5 @@ CREATE TABLE location (
);
CREATE INDEX location_account_contact_idx ON location (username, domain, contact);
+CREATE INDEX location_expires_idx ON location (expires);