Radeity commented on code in PR #14992:
URL: 
https://github.com/apache/dolphinscheduler/pull/14992#discussion_r1351928160


##########
dolphinscheduler-dao/src/main/resources/sql/upgrade/3.3.0_schema/postgresql/dolphinscheduler_ddl.sql:
##########
@@ -14,3 +14,40 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
 */
+-- modify_data_t_ds_dq_rule_input_entry
+delimiter d//
+CREATE OR REPLACE FUNCTION modify_data_t_ds_dq_rule_input_entry() RETURNS void 
AS $$
+BEGIN
+       IF EXISTS (SELECT 1
+                  FROM information_schema.columns
+                  WHERE table_name = 't_ds_dq_rule_input_entry'
+                  AND column_name = 'value')
+      THEN
+         ALTER TABLE t_ds_dq_rule_input_entry
+                 RENAME COLUMN "value" TO "data";
+       END IF;
+END;
+$$ LANGUAGE plpgsql;
+d//
+
+select modify_data_t_ds_dq_rule_input_entry();
+DROP FUNCTION IF EXISTS modify_data_t_ds_dq_rule_input_entry();
+
+-- modify_data_type_t_ds_dq_rule_input_entry
+delimiter d//
+CREATE OR REPLACE FUNCTION modify_data_type_t_ds_dq_rule_input_entry() RETURNS 
void AS $$
+BEGIN
+       IF EXISTS (SELECT 1
+                  FROM information_schema.columns
+                  WHERE table_name = 't_ds_dq_rule_input_entry'
+                  AND column_name = 'value_type')
+      THEN

Review Comment:
   Ditto.



##########
dolphinscheduler-dao/src/main/resources/sql/upgrade/3.3.0_schema/postgresql/dolphinscheduler_ddl.sql:
##########
@@ -14,3 +14,40 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
 */
+-- modify_data_t_ds_dq_rule_input_entry
+delimiter d//
+CREATE OR REPLACE FUNCTION modify_data_t_ds_dq_rule_input_entry() RETURNS void 
AS $$
+BEGIN
+       IF EXISTS (SELECT 1
+                  FROM information_schema.columns
+                  WHERE table_name = 't_ds_dq_rule_input_entry'
+                  AND column_name = 'value')
+      THEN
+         ALTER TABLE t_ds_dq_rule_input_entry
+                 RENAME COLUMN "value" TO "data";
+       END IF;

Review Comment:
   Please align `THEN` with `IF EXISTS`



-- 
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