Skip to content
This repository has been archived by the owner on Jan 21, 2021. It is now read-only.

Commit

Permalink
Update mybatis artifacts server settings
Browse files Browse the repository at this point in the history
  • Loading branch information
ndegwamartin committed Oct 15, 2018
1 parent 13c3fa2 commit 790d2e6
Show file tree
Hide file tree
Showing 12 changed files with 1,282 additions and 880 deletions.
6 changes: 3 additions & 3 deletions assets/migrations/generator/generatorConfig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
<generatorConfiguration>
<classPathEntry
location="/Users/onaio/Workspace/opensrp-server/assets/migrations/drivers/postgresql-42.2.1.jar" />
location="/Users/ndegwamartin/Workspace/opensrp-server/assets/migrations/drivers/postgresql-42.2.1.jar" />
<context id="core">
<!-- <plugin type="org.mybatis.generator.plugins.RowBoundsPlugin"></plugin> -->
<jdbcConnection connectionURL="jdbc:postgresql://localhost:5432/opensrp_anc"
Expand Down Expand Up @@ -62,14 +62,14 @@
<columnOverride column="json"
typeHandler="org.opensrp.repository.postgres.handler.ViewConfigurationTypeHandler" />
</table>
<table schema="core" tableName="view_configuration_metadata" /> -->
<table schema="core" tableName="view_configuration_metadata" />
<table schema="core" tableName="settings">
<columnOverride column="json"
typeHandler="org.opensrp.repository.postgres.handler.SettingTypeHandler" />
</table>

-->
<table schema="core" tableName="settings_metadata" />

</context>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
--
-- Copyright 2010-2016 the original author or authors.
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
--

-- // add settings metadata columns team id team location_id and provider id
-- Migration SQL that makes the change goes here.

ALTER TABLE core.settings_metadata ADD COLUMN team VARCHAR;
ALTER TABLE core.settings_metadata ADD COLUMN team_id VARCHAR;
ALTER TABLE core.settings_metadata ADD COLUMN provider_id VARCHAR;
ALTER TABLE core.settings_metadata ADD COLUMN location_id VARCHAR;

-- //@UNDO
-- SQL to undo the change goes here.

ALTER TABLE core.settings_metadata DROP COLUMN team;
ALTER TABLE core.settings_metadata DROP COLUMN team_id;
ALTER TABLE core.settings_metadata DROP COLUMN provider_id;
ALTER TABLE core.settings_metadata DROP COLUMN location_id;
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
--
-- Copyright 2010-2016 the original author or authors.
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
--

-- // alter settings metadata column identifier remove constraint
-- Migration SQL that makes the change goes here.

ALTER TABLE core.settings_metadata DROP CONSTRAINT settings_metadata_identifier_key

-- //@UNDO
-- SQL to undo the change goes here.

ALTER TABLE core.settings_metadata ADD CONSTRAINT settings_metadata_identifier_key UNIQUE (identifier);
Loading

0 comments on commit 790d2e6

Please sign in to comment.