Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SMS API processing status table #122

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion assets/migrations/generator/generatorConfig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,9 @@
</table>

<table schema="core" tableName="settings_metadata" typeHandler="org.opensrp.repository.postgres.handler.SettingMetadataTypeHandler" />
<table schema="core" tableName="identifier_source" /> -->
<table schema="core" tableName="identifier_source" />
<table schema="core" tableName="sms_api_processing_status" />
-->
</context>

</generatorConfiguration>
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
-- // create sms api processing status table
-- Migration SQL that makes the change goes here.

CREATE TABLE core.sms_api_processing_status
(
id bigserial NOT NULL,
base_entity_id character varying NOT NULL,
event_type character varying NOT NULL,
service_type character varying NOT NULL,
request_status character varying NOT NULL,
request_id character varying UNIQUE NOT NULL,
date_created timestamp,
last_updated timestamp,
sms_delivery_status character varying,
attempts int NOT NULL,
sms_delivery_date timestamp,
PRIMARY KEY (id)
)
WITH (
OIDS = FALSE
) TABLESPACE ${core_tablespace};

CREATE INDEX sms_api_processing_status_request_id_index ON core.sms_api_processing_status (request_id);

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


DROP TABLE core.sms_api_processing_status;