From 6c4cab0a9f5dbc019d81eeaeae46c8f17c7bdca7 Mon Sep 17 00:00:00 2001 From: "David A. Madore" Date: Sun, 12 Oct 2014 21:03:33 +0200 Subject: Rename the "do_single_page" database column to "special_name", and update Java variables accordingly. The SQL command is: ALTER TABLE entries RENAME do_single_page TO special_name ; --- org/madore/damlengine/WeblogPopulate.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'org/madore/damlengine/WeblogPopulate.java') diff --git a/org/madore/damlengine/WeblogPopulate.java b/org/madore/damlengine/WeblogPopulate.java index bb3af48..7c29b03 100644 --- a/org/madore/damlengine/WeblogPopulate.java +++ b/org/madore/damlengine/WeblogPopulate.java @@ -46,13 +46,13 @@ public final class WeblogPopulate { final PreparedStatement checkSt = conn.prepareStatement("SELECT sha1 FROM entries WHERE id=?"); final PreparedStatement insertNSt - = conn.prepareStatement("INSERT INTO entries(id,edate,lang,do_single_page,title,title_xml,content,sha1,has_cut) VALUES (?,?,?,?,?,?::xml,?::xml,?,?)"); + = conn.prepareStatement("INSERT INTO entries(id,edate,lang,special_name,title,title_xml,content,sha1,has_cut) VALUES (?,?,?,?,?,?::xml,?::xml,?,?)"); final PreparedStatement insertCSt - = conn.prepareStatement("INSERT INTO entries(id,edate,lang,do_single_page,title,title_xml,content,sha1,has_cut,cdate) VALUES (?,?,?,?,?,?::xml,?::xml,?,?,?::timestamptz)"); + = conn.prepareStatement("INSERT INTO entries(id,edate,lang,special_name,title,title_xml,content,sha1,has_cut,cdate) VALUES (?,?,?,?,?,?::xml,?::xml,?,?,?::timestamptz)"); final PreparedStatement updateNSt - = conn.prepareStatement("UPDATE entries SET (edate,mdate,lang,do_single_page,title,title_xml,content,sha1,has_cut)=(?,DEFAULT,?,?,?,?::xml,?::xml,?,?) WHERE id=?"); + = conn.prepareStatement("UPDATE entries SET (edate,mdate,lang,special_name,title,title_xml,content,sha1,has_cut)=(?,DEFAULT,?,?,?,?::xml,?::xml,?,?) WHERE id=?"); final PreparedStatement updateCSt - = conn.prepareStatement("UPDATE entries SET (edate,mdate,lang,do_single_page,title,title_xml,content,sha1,has_cut,cdate)=(?,DEFAULT,?,?,?,?::xml,?::xml,?,?,?::timestamptz) WHERE id=?"); + = conn.prepareStatement("UPDATE entries SET (edate,mdate,lang,special_name,title,title_xml,content,sha1,has_cut,cdate)=(?,DEFAULT,?,?,?,?::xml,?::xml,?,?,?::timestamptz) WHERE id=?"); final PreparedStatement checkDateSt = conn.prepareStatement("SELECT to_char(cdate,'YYYY-MM-DD\"T\"HH24:MI:SS\"Z\"') FROM entries WHERE id=?"); final PreparedStatement clearCatSt @@ -86,9 +86,9 @@ public final class WeblogPopulate { cdate = null; String catStr = ent.getAttributeNS(null, "cat"); String[] catList = catStr.split("\\s+"); - String doSinglePage = ent.getAttributeNS(null, "single-page"); - if ( doSinglePage.equals("") ) - doSinglePage = null; + String specialName = ent.getAttributeNS(null, "special-name"); + if ( specialName.equals("") ) + specialName = null; String lang = LangHelper.getLangRec(ent); String content = ser.writeToString(ent); sha1.reset(); @@ -113,7 +113,7 @@ public final class WeblogPopulate { updateSt = updateCSt; updateSt.setString(1, date); updateSt.setString(2, lang); - updateSt.setString(3, doSinglePage); + updateSt.setString(3, specialName); updateSt.setString(4, titleTxt); updateSt.setString(5, titleXml); updateSt.setString(6, content); @@ -136,7 +136,7 @@ public final class WeblogPopulate { insertSt.setInt(1, id); insertSt.setString(2, date); insertSt.setString(3, lang); - insertSt.setString(4, doSinglePage); + insertSt.setString(4, specialName); insertSt.setString(5, titleTxt); insertSt.setString(6, titleXml); insertSt.setString(7, content); -- cgit v1.2.3