Giter Club home page Giter Club logo

opensrp-server-configs's People

Contributors

allan-on avatar andati avatar bennsimon avatar dubdabasoduba avatar ekigamba avatar ellykits avatar githengi avatar manutarus avatar mstjamush avatar ndegwamartin avatar paulinembabu avatar proshantokuet avatar rehammuzzamil avatar rkareko avatar rkodev avatar vincent-karuri avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

opensrp-server-configs's Issues

Add supply catalog table

  • Add supply catalog table as defined in here

  • The table should store most of the data in json with only the search fields being saved on their own columns

Set up scripts for Geo Query

  • Query structures with radius from coordinates

  • Query family details

  • Make residence field on Client JSON index-able on client_metadata

  • Upgrade postgres on travis to 10 and install Postgis 2.4

  • Scripts for manually installing Postgres, the Travis image has older JSON-C Libraries breaking the Geoqueries

Allow Configurations of Scheduled tasks

  • Allow Configuration of the scheduled Tasks under applicationScheduler so that one can configure the duration the tasks run

  • Add a maven profile to disable scheduling so that scheduling is done in 1 node of horizontally scaled nodes

Add extra field to event and client table

Fields:
event_metadata
district
division
branch
Village
event
district
division
branch
Village
provider_id
event_type
form_submission_id
base_entity_id
client_meta
address1
address2
address3
village_id
district
division
branch
village
client
server_version
base_entity_id
district
division
branch
village
base_entity_id

Fix the timestamp of settings sql files

Rename the settings table scripts they are using the timestamp of last year, its not possible to execute them for existing deployments

image

20180904141214 ...pending... create settings table.sql
20180904141237 ...pending... create settings metadata table.sql
20181012141507 ...pending... add settings metadata columns team id team location id and provider id
20181012145616 ...pending... alter settings metadata column identifier remove constraint

Create schema for template table

Create core.template table with the following fields

Template table (core.templates)
Id (int) id
Template Id - (int unique) (identifier)
Template (Json) (template)
Type (String) (e.g. plan)(type) - in case we want to have templates for other entities in future
Version - (int) (version)

Only attempt to create tablespaces if they don't exist

Avoid creating tablespaces again, if they already exist, to prevent the mybatis migration scripts from failing (not good forcing the scripts to continue if one migration fails).

Since the changelog table is within the opensrp database, while tablespaces live outside this database, we end up in issues if the database is recreated (while the tablespaces still exist).

Add location Tags tables

  • Add location Tags tables as per below
    table : location_tag
  • id auto increment bigint primary key
  • name varchar primary key
  • Description varchar

table : location_tag_map

  • location_id bigint
  • location_tag_id bigint

Add version to location metadata table

In order to support versioning of locations we need to make the following adjustments to the location metadata table

  • Add a version column
  • Remove unique constraint on the geojson_id field
  • Add a unique constraint on (geojson_id, vresion) fields

Add server version index

Add an index on the server_version field for the following tables :-
core.event_metadata
core.task_metadata
core.location_metadata
core.structure_metadata

Add duration on organization assignment, add exclusion constraint

Currently we have a problem with the current organization table. If one revoked assignments for today its not possible to create another assignment for today.

The solution involves

  • Adding a check constraint such that to_date is always larger than from_date

  • Delete unique constraint organization_location_organization_id_location_id_plan_id_key

  • Add a duration dateRange column that will store the duration

  • Create an index for organization_id, location_id, plan_id, duration

  • Create an exclusion constraint on organization_id, location_id, plan_id, duration such that we can't have overlapping durations

Create schema for plan processing status table

Create core.plan_processing_status with the following fields :-

Id id
Plan Id FK plan_id (nullable)
Event Id FK event_id (not null)
Template Id FK template_id (Points to core.templates.identifier) (not null)
Status status ( (null|initial - 0) | processing - 1 | complete 2)
Here we can store it as a Postgres Enum. Should be expressive but still efficient as ints.
Date_created date_created timestamp (only on insert)
Last_updated date_updated timestamp (insert, update record)

Create sequence for generating server versions

Create sequence for generating server versions for

  • Events

  • Clients

  • Locations

  • Structures

  • Tasks

  • Plans

  • Settings

  • View configuration

  • Stock

  • Reports

  • Populate the Sequences with the current Max server version

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.