You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/08/16 06:33:54 UTC

[GitHub] [dolphinscheduler] EricGao888 commented on a diff in pull request #11494: [Feature][Style] Configure Spotless to format SQL code in DS

EricGao888 commented on code in PR #11494:
URL: https://github.com/apache/dolphinscheduler/pull/11494#discussion_r946384884


##########
dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_mysql.sql:
##########
@@ -14,1955 +14,6933 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
 */
-
-SET FOREIGN_KEY_CHECKS=0;
+SET
+FOREIGN_KEY_CHECKS = 0;
 
 -- ----------------------------
 -- Table structure for QRTZ_BLOB_TRIGGERS
 -- ----------------------------
-DROP TABLE IF EXISTS `QRTZ_BLOB_TRIGGERS`;
-CREATE TABLE `QRTZ_BLOB_TRIGGERS` (
-  `SCHED_NAME` varchar(120) NOT NULL,
-  `TRIGGER_NAME` varchar(200) NOT NULL,
-  `TRIGGER_GROUP` varchar(200) NOT NULL,
-  `BLOB_DATA` blob,
-  PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
-  KEY `SCHED_NAME` (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
-  CONSTRAINT `QRTZ_BLOB_TRIGGERS_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+DROP
+    TABLE
+        IF EXISTS ` QRTZ_BLOB_TRIGGERS `;
+
+CREATE
+    TABLE
+        ` QRTZ_BLOB_TRIGGERS `(
+            ` SCHED_NAME ` VARCHAR(120) NOT NULL,
+            ` TRIGGER_NAME ` VARCHAR(200) NOT NULL,
+            ` TRIGGER_GROUP ` VARCHAR(200) NOT NULL,
+            ` BLOB_DATA ` BLOB,
+            PRIMARY KEY(
+                ` SCHED_NAME `,
+                ` TRIGGER_NAME `,
+                ` TRIGGER_GROUP `
+            ),
+            KEY ` SCHED_NAME `(
+                ` SCHED_NAME `,
+                ` TRIGGER_NAME `,
+                ` TRIGGER_GROUP `
+            ),
+            CONSTRAINT ` QRTZ_BLOB_TRIGGERS_ibfk_1 ` FOREIGN KEY(
+                ` SCHED_NAME `,
+                ` TRIGGER_NAME `,
+                ` TRIGGER_GROUP `
+            ) REFERENCES ` QRTZ_TRIGGERS `(
+                ` SCHED_NAME `,
+                ` TRIGGER_NAME `,
+                ` TRIGGER_GROUP `
+            )
+        ) ENGINE = InnoDB DEFAULT CHARSET = utf8;
 
 -- ----------------------------
 -- Records of QRTZ_BLOB_TRIGGERS
 -- ----------------------------
-
 -- ----------------------------
 -- Table structure for QRTZ_CALENDARS
 -- ----------------------------
-DROP TABLE IF EXISTS `QRTZ_CALENDARS`;
-CREATE TABLE `QRTZ_CALENDARS` (
-  `SCHED_NAME` varchar(120) NOT NULL,
-  `CALENDAR_NAME` varchar(200) NOT NULL,
-  `CALENDAR` blob NOT NULL,
-  PRIMARY KEY (`SCHED_NAME`,`CALENDAR_NAME`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+DROP
+    TABLE
+        IF EXISTS ` QRTZ_CALENDARS `;
+
+CREATE
+    TABLE
+        ` QRTZ_CALENDARS `(
+            ` SCHED_NAME ` VARCHAR(120) NOT NULL,
+            ` CALENDAR_NAME ` VARCHAR(200) NOT NULL,
+            ` CALENDAR ` BLOB NOT NULL,
+            PRIMARY KEY(
+                ` SCHED_NAME `,
+                ` CALENDAR_NAME `
+            )
+        ) ENGINE = InnoDB DEFAULT CHARSET = utf8;

Review Comment:
   LOL. This is formatted by [dbeaver](https://github.com/diffplug/spotless/tree/main/plugin-maven#dbeaver), we may choose other formatting options, or switch to use [prettier](https://github.com/diffplug/spotless/tree/main/plugin-maven#prettier)... 🤣 



-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org