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_domain','2');
2 1
 CREATE TABLE `uid_domain` (
3 2
     `id` INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
4 3
     `did` VARCHAR(64) NOT NULL,
... ...
@@ -9,7 +8,8 @@ CREATE TABLE `uid_domain` (
9 8
 
10 9
 CREATE INDEX did_idx ON uid_domain (`did`);
11 10
 
12
-INSERT INTO version (table_name, table_version) values ('uid_domain_attrs','1');
11
+INSERT INTO version (table_name, table_version) values ('uid_domain','2');
12
+
13 13
 CREATE TABLE `uid_domain_attrs` (
14 14
     `id` INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
15 15
     `did` VARCHAR(64),
... ...
@@ -22,3 +22,5 @@ CREATE TABLE `uid_domain_attrs` (
22 22
 
23 23
 CREATE INDEX domain_did ON uid_domain_attrs (`did`, `flags`);
24 24
 
25
+INSERT INTO version (table_name, table_version) values ('uid_domain_attrs','1');
26
+
Browse code

kamctl: regenerated mysql creation scripts

Daniel-Constantin Mierla authored on 13/05/2015 20:24:28
Showing 1 changed files
... ...
@@ -1,24 +1,24 @@
1 1
 INSERT INTO version (table_name, table_version) values ('uid_domain','2');
2
-CREATE TABLE uid_domain (
3
-    id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
4
-    did VARCHAR(64) NOT NULL,
5
-    domain VARCHAR(64) NOT NULL,
6
-    flags INT UNSIGNED DEFAULT 0 NOT NULL,
7
-    CONSTRAINT domain_idx UNIQUE (domain)
2
+CREATE TABLE `uid_domain` (
3
+    `id` INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
4
+    `did` VARCHAR(64) NOT NULL,
5
+    `domain` VARCHAR(64) NOT NULL,
6
+    `flags` INT UNSIGNED DEFAULT 0 NOT NULL,
7
+    CONSTRAINT domain_idx UNIQUE (`domain`)
8 8
 );
9 9
 
10
-CREATE INDEX did_idx ON uid_domain (did);
10
+CREATE INDEX did_idx ON uid_domain (`did`);
11 11
 
12 12
 INSERT INTO version (table_name, table_version) values ('uid_domain_attrs','1');
13
-CREATE TABLE uid_domain_attrs (
14
-    id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
15
-    did VARCHAR(64),
16
-    name VARCHAR(32) NOT NULL,
17
-    type INT DEFAULT 0 NOT NULL,
18
-    value VARCHAR(128),
19
-    flags INT UNSIGNED DEFAULT 0 NOT NULL,
20
-    CONSTRAINT domain_attr_idx UNIQUE (did, name, value)
13
+CREATE TABLE `uid_domain_attrs` (
14
+    `id` INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
15
+    `did` VARCHAR(64),
16
+    `name` VARCHAR(32) NOT NULL,
17
+    `type` INT DEFAULT 0 NOT NULL,
18
+    `value` VARCHAR(128),
19
+    `flags` INT UNSIGNED DEFAULT 0 NOT NULL,
20
+    CONSTRAINT domain_attr_idx UNIQUE (`did`, `name`, `value`)
21 21
 );
22 22
 
23
-CREATE INDEX domain_did ON uid_domain_attrs (did, flags);
23
+CREATE INDEX domain_did ON uid_domain_attrs (`did`, `flags`);
24 24
 
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
... ...
@@ -5,7 +5,7 @@ CREATE TABLE uid_domain (
5 5
     domain VARCHAR(64) NOT NULL,
6 6
     flags INT UNSIGNED DEFAULT 0 NOT NULL,
7 7
     CONSTRAINT domain_idx UNIQUE (domain)
8
-) ENGINE=MyISAM;
8
+);
9 9
 
10 10
 CREATE INDEX did_idx ON uid_domain (did);
11 11
 
... ...
@@ -18,7 +18,7 @@ CREATE TABLE uid_domain_attrs (
18 18
     value VARCHAR(128),
19 19
     flags INT UNSIGNED DEFAULT 0 NOT NULL,
20 20
     CONSTRAINT domain_attr_idx UNIQUE (did, name, value)
21
-) ENGINE=MyISAM;
21
+);
22 22
 
23 23
 CREATE INDEX domain_did ON uid_domain_attrs (did, flags);
24 24
 
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
... ...
@@ -5,7 +5,7 @@ CREATE TABLE uid_domain (
5 5
     domain VARCHAR(64) NOT NULL,
6 6
     flags INT UNSIGNED DEFAULT 0 NOT NULL,
7 7
     CONSTRAINT domain_idx UNIQUE (domain)
8
-) ENGINE=InnoDB;
8
+) ENGINE=MyISAM;
9 9
 
10 10
 CREATE INDEX did_idx ON uid_domain (did);
11 11
 
... ...
@@ -18,7 +18,7 @@ CREATE TABLE uid_domain_attrs (
18 18
     value VARCHAR(128),
19 19
     flags INT UNSIGNED DEFAULT 0 NOT NULL,
20 20
     CONSTRAINT domain_attr_idx UNIQUE (did, name, value)
21
-) ENGINE=InnoDB;
21
+) ENGINE=MyISAM;
22 22
 
23 23
 CREATE INDEX domain_did ON uid_domain_attrs (did, flags);
24 24
 
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
... ...
@@ -5,7 +5,7 @@ CREATE TABLE uid_domain (
5 5
     domain VARCHAR(64) NOT NULL,
6 6
     flags INT UNSIGNED DEFAULT 0 NOT NULL,
7 7
     CONSTRAINT domain_idx UNIQUE (domain)
8
-) ENGINE=MyISAM;
8
+) ENGINE=InnoDB;
9 9
 
10 10
 CREATE INDEX did_idx ON uid_domain (did);
11 11
 
... ...
@@ -18,7 +18,7 @@ CREATE TABLE uid_domain_attrs (
18 18
     value VARCHAR(128),
19 19
     flags INT UNSIGNED DEFAULT 0 NOT NULL,
20 20
     CONSTRAINT domain_attr_idx UNIQUE (did, name, value)
21
-) ENGINE=MyISAM;
21
+) ENGINE=InnoDB;
22 22
 
23 23
 CREATE INDEX domain_did ON uid_domain_attrs (did, flags);
24 24
 
Browse code

libsrdb1/kamctl: added uid_domain and uid_domain_attrs tables

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