ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/owl/tags/aglappe-0.9.6/createGraphDb.sh
(Generate patch)
# Line 6 | Line 6
6          echo "Usage: $1 -d <db_name> -m <mode>"
7          echo
8          echo "-d <db_name>      the graph database name "
9 <        echo "-m <mode>         create/index/unindex tables "
9 >        echo "-m <mode>         create/index/unindex/drop tables "
10          echo
11   }
12  
# Line 95 | Line 95
95                  MODIFY graph_id INT UNSIGNED NOT NULL AUTO_INCREMENT;
96          
97          ALTER TABLE single_model_node
98 +                MODIFY node_id INT AUTO_INCREMENT NOT NULL PRIMARY KEY,
99                  MODIFY num INT NOT NULL,
100                  MODIFY ssid VARCHAR(5),
101                  MODIFY sheet_serial CHAR(1);
# Line 127 | Line 128
128          DROP INDEX EDGE_GRAPH_IDX ON single_model_edge;
129   ENDSQL
130   fi
131 +
132 + if [ "$mode" == "DROP" ]
133 + then
134 + $mysqlbin -pnieve -h $h -B -N $graphDb <<ENDSQL
135 +        SET sql_mode = "NO_UNSIGNED_SUBTRACTION,TRADITIONAL";
136 +        DROP TABLE chain_graph;
137 +        DROP TABLE scop_graph;  
138 +        DROP TABLE single_model_graph;  
139 +        DROP TABLE single_model_node;
140 +        DROP TABLE single_model_edge;
141 +        DROP TABLE pdb_residue_info;    
142 + ENDSQL
143 + fi

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines