Lisätty issue #2 listatut ominaisuudet
Signed-off-by: laurimaaninka <lauri.maaninka@gmail.com>
This commit is contained in:
@@ -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")) {
|
||||
|
||||
Reference in New Issue
Block a user