[Evolvis-commits] r299: Added db_drop_sequence_if_exists(). ↵

mirabilos at evolvis.org mirabilos at evolvis.org
Thu Feb 25 14:14:59 CET 2010


Author: mirabilos
Date: 2010-02-25 13:14:59 +0000 (Thu, 25 Feb 2010)
New Revision: 299

Modified:
   trunk/gforge_base/evolvisforge/
   trunk/gforge_base/evolvisforge/gforge/www/include/database.php
Log:
Added db_drop_sequence_if_exists().



Property changes on: trunk/gforge_base/evolvisforge
___________________________________________________________________
Name: bzr:revision-info
   - timestamp: 2001-09-15 06:47:43.000000000 +0000
committer: cbayle

   + timestamp: 2001-09-15 13:34:10.000000000 +0000
committer: lo-lan-do

Name: bzr:file-ids
   - gforge/deb-specific/local.inc.template	7 at 9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk%2Fgforge%2Fdeb-specific%2Flocal.inc.template

   + gforge/www/include/database.php	2 at 9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk%2Fgforge%2Fwww%2Finclude%2Fdatabase.php

Name: bzr:revision-id:v4
   - 1 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:1
2 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:2
3 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:7
4 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:9
5 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:10
6 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:11
7 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:12
8 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:13
9 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:14
10 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:15
11 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:16
12 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:17
13 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:18
14 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:19
15 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:20
16 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:21
17 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:22
18 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:23
19 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:24
20 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:25
21 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:26
22 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:27
23 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:28
24 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:29
25 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:30
26 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:31
27 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:32
28 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:33
29 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:34
30 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:35
31 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:36
32 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:37
33 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:38
34 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:39
35 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:40
36 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:41
37 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:42
38 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:43
39 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:44
40 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:45
41 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:46
42 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:47
43 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:48
44 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:49
45 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:50
46 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:51
47 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:52
48 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:53
49 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:54
50 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:55
51 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:56
52 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:57
53 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:58
54 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:59
55 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:60
56 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:61
57 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:62
58 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:63
59 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:64
60 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:65
61 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:66
62 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:67
63 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:68
64 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:69

   + 1 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:1
2 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:2
3 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:7
4 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:9
5 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:10
6 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:11
7 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:12
8 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:13
9 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:14
10 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:15
11 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:16
12 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:17
13 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:18
14 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:19
15 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:20
16 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:21
17 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:22
18 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:23
19 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:24
20 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:25
21 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:26
22 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:27
23 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:28
24 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:29
25 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:30
26 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:31
27 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:32
28 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:33
29 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:34
30 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:35
31 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:36
32 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:37
33 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:38
34 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:39
35 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:40
36 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:41
37 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:42
38 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:43
39 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:44
40 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:45
41 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:46
42 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:47
43 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:48
44 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:49
45 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:50
46 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:51
47 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:52
48 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:53
49 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:54
50 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:55
51 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:56
52 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:57
53 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:58
54 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:59
55 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:60
56 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:61
57 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:62
58 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:63
59 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:64
60 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:65
61 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:66
62 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:67
63 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:68
64 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:69
65 svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:70

Name: bzr:text-parents
   - gforge/deb-specific/local.inc.template	svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:63

   + gforge/www/include/database.php	svn-v4:9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:trunk:7


Modified: trunk/gforge_base/evolvisforge/gforge/www/include/database.php
===================================================================
--- trunk/gforge_base/evolvisforge/gforge/www/include/database.php	2010-02-25 13:14:55 UTC (rev 298)
+++ trunk/gforge_base/evolvisforge/gforge/www/include/database.php	2010-02-25 13:14:59 UTC (rev 299)
@@ -244,4 +244,16 @@
     echo db_error();
   }
 }
+
+function db_drop_sequence_if_exists ($tn) {
+  $sql = "SELECT COUNT(*) FROM pg_class WHERE relname='$tn';";
+  $rel = db_query($sql);
+  echo db_error();
+  $count = db_result($rel,0,0);
+  if ($count != 0) {
+    $sql = "DROP SEQUENCE $tn;";
+    $rel = db_query ($sql);
+    echo db_error();
+  }
+}
 ?>




More information about the evolvis-commits mailing list