| 12345678910111213141516171819202122 |
- import java.sql.*;
- public class PatchInputModalities {
- public static void main(String[] a) throws Exception {
- Class.forName("com.mysql.cj.jdbc.Driver");
- String jdbc = "jdbc:mysql://cq-cdb-8fjmemkb.sql.tencentcdb.com:27220/fs_tenant_cs1"
- + "?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8";
- try (Connection c = DriverManager.getConnection(jdbc, "root", "Ylrz_1q2w3e4r5t6y");
- Statement st = c.createStatement()) {
- try {
- st.execute("ALTER TABLE admin_ai_model ADD COLUMN input_modalities VARCHAR(255) NULL");
- System.out.println("added input_modalities");
- } catch (SQLException e) {
- if (e.getMessage() != null && e.getMessage().contains("Duplicate column")) {
- System.out.println("column already exists");
- } else {
- throw e;
- }
- }
- }
- }
- }
|