adamsaghy commented on code in PR #3994:
URL: https://github.com/apache/fineract/pull/3994#discussion_r1746155777


##########
custom/v3/command/domain/src/main/resources/db/custom-changelog/0001_create_command_table.xml:
##########
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements. See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership. The ASF licenses this file
+    to you 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.
+
+-->
+<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog";
+                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+                   
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog 
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.xsd";>
+
+    <changeSet author="fineract" id="1" context="postgresql">
+        <sql>
+            CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
+        </sql>
+    </changeSet>
+
+    <!-- Create the m_command table for PostgreSQL -->
+    <changeSet author="fineract" id="2" context="postgresql">
+        <preConditions onFail="MARK_RAN">
+            <not>
+                <tableExists tableName="m_command"/>
+            </not>
+        </preConditions>
+
+        <createTable tableName="m_command">
+            <column autoIncrement="true" name="id" type="BIGINT" 
remarks="Internal ID">
+                <constraints nullable="false" primaryKey="true"/>
+            </column>
+            <column name="request_idempotency_key" type="VARCHAR(50)" 
remarks="Unique request idempotency key">
+                <constraints nullable="false" unique="true"/>
+            </column>
+            <column name="command_processing_status" type="VARCHAR(255)" 
remarks="Command processing status"/>
+            <column name="command_result" type="TEXT" remarks="Command 
result"/>
+            <column name="result_status_code" type="INTEGER" remarks="Result 
status code"/>
+            <column name="created_date" type="TIMESTAMP WITH TIME ZONE" 
remarks="Creation date"/>
+            <column name="processed_at" type="TIMESTAMP WITH TIME ZONE" 
remarks="Processing timestamp"/>
+            <column name="request_body" type="TEXT" remarks="Request body"/>

Review Comment:
   @vidakovic I dont think jsonb would work with mysql or mariadb... isnt it 
postgres specific?
   
   I reckon we can differentiate json and jsonb based on which engine is used 
if needed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to