| 174 | -- Upgrade ontology table to version 1.6 |
| 175 | |
| 176 | DECLARE @UpgradeOntology1_6A VARCHAR(MAX) |
| 177 | DECLARE @UpgradeOntology1_6B VARCHAR(MAX) |
| 178 | |
| 179 | SET @UpgradeOntology1_6A = ' |
| 180 | ALTER TABLE ' + @OntologyName + ' |
| 181 | ADD m_applied_path varchar(700) NULL |
| 182 | ; |
| 183 | |
| 184 | ALTER TABLE ' + @OntologyName + ' |
| 185 | ADD m_exclusion_cd varchar(25) NULL |
| 186 | ; |
| 187 | |
| 188 | ALTER TABLE ' + @OntologyName + ' |
| 189 | ADD C_PATH VARCHAR(700) NULL |
| 190 | ; |
| 191 | |
| 192 | ALTER TABLE ' + @OntologyName + ' |
| 193 | ADD C_SYMBOL VARCHAR(50) NULL |
| 194 | ; |
| 195 | ' |
| 196 | |
| 197 | SET @UpgradeOntology1_6B = ' |
| 198 | UPDATE ' + @OntologyName + ' |
| 199 | SET m_applied_path = ''@'' |
| 200 | ; |
| 201 | |
| 202 | ALTER TABLE ' + @OntologyName + ' |
| 203 | ALTER COLUMN [m_applied_path] varchar(700) NOT NULL |
| 204 | ; |
| 205 | |
| 206 | CREATE INDEX ' + @OntologyName + '_META_FULLNAME_IDX ON ' + @OntologyName + '(C_FULLNAME); |
| 207 | |
| 208 | CREATE INDEX ' + @OntologyName + '_META_APPLIED_PATH_IDX ON ' + @OntologyName + '(M_APPLIED_PATH); |
| 209 | ' |
| 210 | |
| 211 | EXEC (@UpgradeOntology1_6A); |
| 212 | EXEC (@UpgradeOntology1_6B); |
| 213 | |