Lisätty issue #2 listatut ominaisuudet

Signed-off-by: laurimaaninka <lauri.maaninka@gmail.com>
This commit is contained in:
2026-05-08 16:38:43 +03:00
parent 997833611c
commit 91d2a35799
9 changed files with 205 additions and 132 deletions
@@ -38,11 +38,11 @@ public class Tietokanta {
handleException(e);
}
//Lisää laskutustiedot asiakastauluun
String[] sarakkeet = {"laskutusosoite", "yhteyshenkilönNimi", "yhteyshenkilönPuhelinnumero", "yhteyshenkilönSähköposti"};
//Lisää kuljetuspäivät asiakassarakkeeseen (v2.0.2->3.x.x)
String[] sarakkeet = {"lauantaiKpl", "sunnuntaiKpl"};
for (String sarake : sarakkeet) {
try (Connection conn = haeYhteys()) {
PreparedStatement stmt = conn.prepareStatement("alter table asiakkaat add column " + sarake + " varchar(255)");
PreparedStatement stmt = conn.prepareStatement("alter table asiakkaat add column " + sarake + " int not null default 0");
stmt.execute();
} catch (SQLException e) {
if (!e.getMessage().contains("duplicate column name")) {