Skip to content

Commit

Permalink
Einstellungen latin1, manche Spalten utf8mb4
Browse files Browse the repository at this point in the history
  • Loading branch information
nils authored and nils committed Dec 17, 2024
1 parent 587646c commit 7b5942f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
15 changes: 12 additions & 3 deletions src/de/jost_net/JVerein/server/DDLTool/Updates/Update0363.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,17 @@ public Update0363(String driver, ProgressMonitor monitor, Connection conn)
@Override
public void run() throws ApplicationException
{
// Liquibase id=99
execute(addColumn("einstellung",
new Column("mailsignatur", COLTYPE.VARCHAR, 1000, null, false, false)));

if (getDriver().equals(DRIVER.MYSQL))
{
execute("ALTER TABLE einstellung ADD mailsignatur VARCHAR(1000) "
+ "CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci;");
}
else
{
// Liquibase id=99
execute(addColumn("einstellung", new Column("mailsignatur",
COLTYPE.VARCHAR, 1000, null, false, false)));
}
}
}
13 changes: 8 additions & 5 deletions src/de/jost_net/JVerein/server/JVereinUpdateProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,8 @@ private void update0028(Connection conn) throws ApplicationException
sb.append(" rechnungfuerbarzahlung CHAR(5),");
sb.append(" UNIQUE (id),");
sb.append(" PRIMARY KEY (id)");
sb.append(" ) ENGINE=InnoDB COLLATE='latin1_swedish_ci';\n");
sb.append(
" ) ENGINE=InnoDB CHARACTER SET='latin1' COLLATE='latin1_german1_ci' ROW_FORMAT=DYNAMIC;\n");
statements.put(DBSupportMySqlImpl.class.getName(), sb.toString());

execute(conn, statements, 28);
Expand Down Expand Up @@ -3805,7 +3806,8 @@ private void update0172(Connection conn) throws ApplicationException

// Update fuer MySQL
sb = new StringBuilder();
sb.append("ALTER TABLE einstellung ADD strasse char(30) after name;\n");
sb.append(
"ALTER TABLE einstellung ADD strasse char(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci after name;\n");
statements.put(DBSupportMySqlImpl.class.getName(), sb.toString());

execute(conn, statements, 172);
Expand Down Expand Up @@ -4688,7 +4690,7 @@ private void update0218(Connection conn) throws ApplicationException
statements.put(DBSupportH2Impl.class.getName(),
"ALTER TABLE einstellung ALTER COLUMN strasse VARCHAR(50);\n");
statements.put(DBSupportMySqlImpl.class.getName(),
"ALTER TABLE einstellung MODIFY COLUMN strasse VARCHAR(50);\n");
"ALTER TABLE einstellung MODIFY COLUMN strasse VARCHAR(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci;\n");
execute(conn, statements, 218);
}

Expand Down Expand Up @@ -5211,7 +5213,7 @@ private void update0249(Connection conn) throws ApplicationException
// Update fuer MySQL
sb = new StringBuilder();
sb.append(
"ALTER TABLE einstellung ADD smtp_from_anzeigename varchar(50) after smtp_from_address;\n");
"ALTER TABLE einstellung ADD smtp_from_anzeigename varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci after smtp_from_address;\n");
statements.put(DBSupportMySqlImpl.class.getName(), sb.toString());

execute(conn, statements, 249);
Expand Down Expand Up @@ -6890,7 +6892,8 @@ private void update0339(Connection conn) throws ApplicationException
private void update0340(Connection conn) throws ApplicationException
{
Map<String, String> statements = new HashMap<String, String>();
String sql = alterColumn("einstellung", "name", "VARCHAR(70)");
String sql = alterColumn("einstellung", "name",
"VARCHAR(70) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci");
statements.put(driver, sql);
execute(conn, statements, 340);
}
Expand Down

0 comments on commit 7b5942f

Please sign in to comment.