Browse Source

Fixed bug in Tripal installt that munges the table comments

Stephen Ficklin 9 years ago
parent
commit
105c830b91
1 changed files with 7 additions and 7 deletions
  1. 7 7
      tripal_core/includes/tripal_core.chado_install.inc

+ 7 - 7
tripal_core/includes/tripal_core.chado_install.inc

@@ -273,11 +273,11 @@ function tripal_core_install_sql($sql_file) {
     // Find SQL for new objects
     if (preg_match('/^\s*CREATE\s+TABLE/i', $line) and !$in_string) {
       $stack[] = 'table';
-      $line = preg_replace("/public./", "chado.", $line);
+      $line = preg_replace("/public\./", "chado.", $line);
     }
     if (preg_match('/^\s*ALTER\s+TABLE/i', $line) and !$in_string) {
       $stack[] = 'alter table';
-      $line = preg_replace("/public./", "chado.", $line);
+      $line = preg_replace("/public\./", "chado.", $line);
     }
     if (preg_match('/^\s*SET/i', $line) and !$in_string) {
       $stack[] = 'set';
@@ -287,26 +287,26 @@ function tripal_core_install_sql($sql_file) {
     }
     if (preg_match('/^\s*CREATE\s+SEQUENCE/i', $line) and !$in_string) {
       $stack[] = 'sequence';
-      $line = preg_replace("/public./", "chado.", $line);
+      $line = preg_replace("/public\./", "chado.", $line);
     }
     if (preg_match('/^\s*CREATE\s+(?:OR\s+REPLACE\s+)*VIEW/i', $line) and !$in_string) {
       $stack[] = 'view';
-      $line = preg_replace("/public./", "chado.", $line);
+      $line = preg_replace("/public\./", "chado.", $line);
     }
     if (preg_match('/^\s*COMMENT/i', $line) and !$in_string and sizeof($stack)==0) {
       $stack[] = 'comment';
-      $line = preg_replace("/public./", "chado.", $line);
+      $line = preg_replace("/public\./", "chado.", $line);
     }
     if (preg_match('/^\s*CREATE\s+(?:OR\s+REPLACE\s+)*FUNCTION/i', $line) and !$in_string) {
       $stack[] = 'function';
-      $line = preg_replace("/public./", "chado.", $line);
+      $line = preg_replace("/public\./", "chado.", $line);
     }
     if (preg_match('/^\s*CREATE\s+INDEX/i', $line) and !$in_string) {
       $stack[] = 'index';
     }
     if (preg_match('/^\s*INSERT\s+INTO/i', $line) and !$in_string) {
       $stack[] = 'insert';
-      $line = preg_replace("/public./", "chado.", $line);
+      $line = preg_replace("/public\./", "chado.", $line);
     }
     if (preg_match('/^\s*CREATE\s+TYPE/i', $line) and !$in_string) {
       $stack[] = 'type';