Low Level Database Access: Difference between revisions
Content deleted Content added
imported>Hendrik Brummermann No edit summary |
imported>Kymara m →Updating the database structure: typo |
||
Line 61:
Unfortunately there is no "create column if not exists" clause in SQL. So if we have the need to add columns to existing tables, we will need to do the check ourselves.
The following example shows the code that was used to add the new result column to the passwordChange table. Before that column was added, only successful password changes were logged. So the result column should be
<source lang="java">
if (!transaction.doesColumnExist("passwordChange", "result")) {
| |||