Browse code

version table added; phplib_id added to pending

Jiri Kuthan authored on 30/08/2002 01:49:44
Showing 1 changed files
... ...
@@ -14,12 +14,13 @@
14 14
 # config vars
15 15
 #################################################################
16 16
 DBNAME=ser
17
+DBHOST=dbhost
17 18
 USERNAME=ser
18 19
 DEFAULT_PW=heslo
19 20
 ROUSER=serro
20 21
 RO_PW=47serro11
21
-CMD="mysql -p -u "
22
-BACKUP_CMD="mysqldump -p -c -t -u "
22
+CMD="mysql -h $DBHOST -p -u "
23
+BACKUP_CMD="mysqldump -h $DBHOST -p -c -t -u "
23 24
 TABLE_TYPE="TYPE=MyISAM"
24 25
 SQL_USER="root"
25 26
 
... ...
@@ -93,6 +94,34 @@ use $1;
93 94
 GRANT ALL PRIVILEGES ON $1.* TO $USERNAME IDENTIFIED  BY '$DEFAULT_PW';
94 95
 GRANT SELECT ON $1.* TO $ROUSER IDENTIFIED BY '$RO_PW';
95 96
 
97
+
98
+#
99
+# Table structure versions
100
+#
101
+
102
+CREATE TABLE version (
103
+   table_name varchar(64) NOT NULL,
104
+   version smallint(5) DEFAULT '0' NOT NULL
105
+) $TABLE_TYPE;
106
+
107
+#
108
+# Dumping data for table 'version'
109
+#
110
+
111
+INSERT INTO version VALUES ( 'subscriber', '1');
112
+INSERT INTO version VALUES ( 'reserved', '1');
113
+INSERT INTO version VALUES ( 'phonebook', '1');
114
+INSERT INTO version VALUES ( 'pending', '1');
115
+INSERT INTO version VALUES ( 'missed_calls', '1');
116
+INSERT INTO version VALUES ( 'location', '1');
117
+INSERT INTO version VALUES ( 'grp', '1');
118
+INSERT INTO version VALUES ( 'event', '1');
119
+INSERT INTO version VALUES ( 'aliases', '1');
120
+INSERT INTO version VALUES ( 'active_sessions', '1');
121
+INSERT INTO version VALUES ( 'acc', '1');
122
+
123
+
124
+
96 125
 #
97 126
 # Table structure for table 'acc' -- accounted calls
98 127
 #
... ...
@@ -231,6 +260,7 @@ CREATE TABLE missed_calls (
231 260
 
232 261
 
233 262
 CREATE TABLE pending (
263
+  phplib_id varchar(32) NOT NULL default '',
234 264
   USER_ID varchar(100) NOT NULL default '',
235 265
   PASSWORD varchar(25) NOT NULL default '',
236 266
   FIRST_NAME varchar(25) NOT NULL default '',
... ...
@@ -247,7 +277,8 @@ CREATE TABLE pending (
247 277
   REALM varchar(128) NOT NULL default '',
248 278
   ha1b varchar(128) NOT NULL default '',
249 279
   UNIQUE KEY USER_ID (USER_ID),
250
-  KEY USER_ID_2 (USER_ID)
280
+  KEY USER_ID_2 (USER_ID),
281
+  UNIQUE KEY phplib_id (phplib_id),
251 282
 ) $TABLE_TYPE;
252 283
 
253 284