title: Define default column value with annotations in Hibernate
body: <p>I know there are plenty of these questions here on SO and also on the net, but all the answers suggest using <code>columnDefinition</code> which is database specific and hence not applicable for me because the system I'm working on needs to run on different databases.</p>
  
  <p>I found this <a href="https://hibernate.atlassian.net/browse/HHH-4341" rel="noreferrer">hibernate issue</a> where someone requested this feature for annotations. The issue has been closed saying that <a href="https://hibernate.atlassian.net/browse/HHH-2907" rel="noreferrer">another issue</a> will cover that functionality. The second issue apparently added annotation <code>@Generated</code> and also some others, but I couldn't find any documentation on how to define the default column value with those new annotations.</p>
  
  <p>So my question is: Does anyone know how can I define a default column value with annotations (and NOT using <code>columnDefinition</code>)? </p>
  
  <p><strong>Edit:</strong> to further clarify my problem: When I add a new not null column, I need Hibernate to update the existing schema (add the new column to the respective table). But since the column is non null, the database cannot create the column without specifying the default value (if there are already some rows in the table). So I need to instruct Hibernate to issue the following DDL statement: <code>ALTER TABLE my_table ADD COLUMN new_column VARCHAR(3) DEFAULT 'def'</code>, but it has to be independent of the used database. </p>