Browse code

kamctl: db sql files updated after xsl changes

- insert statement for version is after creation of the table

Daniel-Constantin Mierla authored on 04/12/2015 20:59:11
Showing 1 changed files
... ...
@@ -1,4 +1,3 @@
1
-INSERT INTO version (table_name, table_version) values ('uid_uri','3');
2 1
 CREATE TABLE `uid_uri` (
3 2
     `id` INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
4 3
     `uid` VARCHAR(64) NOT NULL,
... ...
@@ -11,7 +10,8 @@ CREATE TABLE `uid_uri` (
11 10
 CREATE INDEX uri_idx1 ON uid_uri (`username`, `did`, `scheme`);
12 11
 CREATE INDEX uri_uid ON uid_uri (`uid`);
13 12
 
14
-INSERT INTO version (table_name, table_version) values ('uid_uri_attrs','2');
13
+INSERT INTO version (table_name, table_version) values ('uid_uri','3');
14
+
15 15
 CREATE TABLE `uid_uri_attrs` (
16 16
     `id` INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
17 17
     `username` VARCHAR(64) NOT NULL,
... ...
@@ -24,3 +24,5 @@ CREATE TABLE `uid_uri_attrs` (
24 24
     CONSTRAINT uriattrs_idx UNIQUE (`username`, `did`, `name`, `value`, `scheme`)
25 25
 );
26 26
 
27
+INSERT INTO version (table_name, table_version) values ('uid_uri_attrs','2');
28
+
Browse code

kamctl: regenerated mysql creation scripts

Daniel-Constantin Mierla authored on 13/05/2015 20:24:28
Showing 1 changed files
... ...
@@ -1,26 +1,26 @@
1 1
 INSERT INTO version (table_name, table_version) values ('uid_uri','3');
2
-CREATE TABLE uid_uri (
3
-    id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
4
-    uid VARCHAR(64) NOT NULL,
5
-    did VARCHAR(64) NOT NULL,
6
-    username VARCHAR(64) NOT NULL,
7
-    flags INT UNSIGNED DEFAULT 0 NOT NULL,
8
-    scheme VARCHAR(8) DEFAULT 'sip' NOT NULL
2
+CREATE TABLE `uid_uri` (
3
+    `id` INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
4
+    `uid` VARCHAR(64) NOT NULL,
5
+    `did` VARCHAR(64) NOT NULL,
6
+    `username` VARCHAR(64) NOT NULL,
7
+    `flags` INT UNSIGNED DEFAULT 0 NOT NULL,
8
+    `scheme` VARCHAR(8) DEFAULT 'sip' NOT NULL
9 9
 );
10 10
 
11
-CREATE INDEX uri_idx1 ON uid_uri (username, did, scheme);
12
-CREATE INDEX uri_uid ON uid_uri (uid);
11
+CREATE INDEX uri_idx1 ON uid_uri (`username`, `did`, `scheme`);
12
+CREATE INDEX uri_uid ON uid_uri (`uid`);
13 13
 
14 14
 INSERT INTO version (table_name, table_version) values ('uid_uri_attrs','2');
15
-CREATE TABLE uid_uri_attrs (
16
-    id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
17
-    username VARCHAR(64) NOT NULL,
18
-    did VARCHAR(64) NOT NULL,
19
-    name VARCHAR(32) NOT NULL,
20
-    value VARCHAR(128),
21
-    type INT DEFAULT 0 NOT NULL,
22
-    flags INT UNSIGNED DEFAULT 0 NOT NULL,
23
-    scheme VARCHAR(8) DEFAULT 'sip' NOT NULL,
24
-    CONSTRAINT uriattrs_idx UNIQUE (username, did, name, value, scheme)
15
+CREATE TABLE `uid_uri_attrs` (
16
+    `id` INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
17
+    `username` VARCHAR(64) NOT NULL,
18
+    `did` VARCHAR(64) NOT NULL,
19
+    `name` VARCHAR(32) NOT NULL,
20
+    `value` VARCHAR(128),
21
+    `type` INT DEFAULT 0 NOT NULL,
22
+    `flags` INT UNSIGNED DEFAULT 0 NOT NULL,
23
+    `scheme` VARCHAR(8) DEFAULT 'sip' NOT NULL,
24
+    CONSTRAINT uriattrs_idx UNIQUE (`username`, `did`, `name`, `value`, `scheme`)
25 25
 );
26 26
 
Browse code

DB scheme: remove default MySQL engine definition

* remove default MySQL engine definition from table definitions
* if nothing is specified then MySQL server will choose the default from its cfg
* if you like to specify it, change the MYSQL_TABLE_TYPE define in
lib/srdb1/schema/entities.xml and run "make dbschema" in the top level directory
* the stylesheet doesn't check the engine type, Kamailio supports MyISAM and InnoDB

Henning Westerholt authored on 29/05/2013 10:38:10
Showing 1 changed files
... ...
@@ -6,7 +6,7 @@ CREATE TABLE uid_uri (
6 6
     username VARCHAR(64) NOT NULL,
7 7
     flags INT UNSIGNED DEFAULT 0 NOT NULL,
8 8
     scheme VARCHAR(8) DEFAULT 'sip' NOT NULL
9
-) ENGINE=MyISAM;
9
+);
10 10
 
11 11
 CREATE INDEX uri_idx1 ON uid_uri (username, did, scheme);
12 12
 CREATE INDEX uri_uid ON uid_uri (uid);
... ...
@@ -22,5 +22,5 @@ CREATE TABLE uid_uri_attrs (
22 22
     flags INT UNSIGNED DEFAULT 0 NOT NULL,
23 23
     scheme VARCHAR(8) DEFAULT 'sip' NOT NULL,
24 24
     CONSTRAINT uriattrs_idx UNIQUE (username, did, name, value, scheme)
25
-) ENGINE=MyISAM;
25
+);
26 26
 
Browse code

Revert "DB scheme: as discussed on sr-users list, change default mysql engine to InnoDB"

This reverts commit fa49fe070adadfff893b338f2a2d69776c043653.

Henning Westerholt authored on 29/05/2013 10:30:58
Showing 1 changed files
... ...
@@ -6,7 +6,7 @@ CREATE TABLE uid_uri (
6 6
     username VARCHAR(64) NOT NULL,
7 7
     flags INT UNSIGNED DEFAULT 0 NOT NULL,
8 8
     scheme VARCHAR(8) DEFAULT 'sip' NOT NULL
9
-) ENGINE=InnoDB;
9
+) ENGINE=MyISAM;
10 10
 
11 11
 CREATE INDEX uri_idx1 ON uid_uri (username, did, scheme);
12 12
 CREATE INDEX uri_uid ON uid_uri (uid);
... ...
@@ -22,5 +22,5 @@ CREATE TABLE uid_uri_attrs (
22 22
     flags INT UNSIGNED DEFAULT 0 NOT NULL,
23 23
     scheme VARCHAR(8) DEFAULT 'sip' NOT NULL,
24 24
     CONSTRAINT uriattrs_idx UNIQUE (username, did, name, value, scheme)
25
-) ENGINE=InnoDB;
25
+) ENGINE=MyISAM;
26 26
 
Browse code

DB scheme: as discussed on sr-users list, change default mysql engine to InnoDB

Henning Westerholt authored on 29/05/2013 09:49:59
Showing 1 changed files
... ...
@@ -6,7 +6,7 @@ CREATE TABLE uid_uri (
6 6
     username VARCHAR(64) NOT NULL,
7 7
     flags INT UNSIGNED DEFAULT 0 NOT NULL,
8 8
     scheme VARCHAR(8) DEFAULT 'sip' NOT NULL
9
-) ENGINE=MyISAM;
9
+) ENGINE=InnoDB;
10 10
 
11 11
 CREATE INDEX uri_idx1 ON uid_uri (username, did, scheme);
12 12
 CREATE INDEX uri_uid ON uid_uri (uid);
... ...
@@ -22,5 +22,5 @@ CREATE TABLE uid_uri_attrs (
22 22
     flags INT UNSIGNED DEFAULT 0 NOT NULL,
23 23
     scheme VARCHAR(8) DEFAULT 'sip' NOT NULL,
24 24
     CONSTRAINT uriattrs_idx UNIQUE (username, did, name, value, scheme)
25
-) ENGINE=MyISAM;
25
+) ENGINE=InnoDB;
26 26
 
Browse code

srdb1/kamctl: added uid_uri and uid_uri_attrs tables

Daniel-Constantin Mierla authored on 29/12/2012 15:15:07
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,26 @@
1
+INSERT INTO version (table_name, table_version) values ('uid_uri','3');
2
+CREATE TABLE uid_uri (
3
+    id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
4
+    uid VARCHAR(64) NOT NULL,
5
+    did VARCHAR(64) NOT NULL,
6
+    username VARCHAR(64) NOT NULL,
7
+    flags INT UNSIGNED DEFAULT 0 NOT NULL,
8
+    scheme VARCHAR(8) DEFAULT 'sip' NOT NULL
9
+) ENGINE=MyISAM;
10
+
11
+CREATE INDEX uri_idx1 ON uid_uri (username, did, scheme);
12
+CREATE INDEX uri_uid ON uid_uri (uid);
13
+
14
+INSERT INTO version (table_name, table_version) values ('uid_uri_attrs','2');
15
+CREATE TABLE uid_uri_attrs (
16
+    id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
17
+    username VARCHAR(64) NOT NULL,
18
+    did VARCHAR(64) NOT NULL,
19
+    name VARCHAR(32) NOT NULL,
20
+    value VARCHAR(128),
21
+    type INT DEFAULT 0 NOT NULL,
22
+    flags INT UNSIGNED DEFAULT 0 NOT NULL,
23
+    scheme VARCHAR(8) DEFAULT 'sip' NOT NULL,
24
+    CONSTRAINT uriattrs_idx UNIQUE (username, did, name, value, scheme)
25
+) ENGINE=MyISAM;
26
+