View Javadoc

1   package liquibase.change.core;
2   
3   import liquibase.change.AbstractSQLChange;
4   import liquibase.change.ChangeMetaData;
5   
6   /**
7    * Allows execution of arbitrary SQL. This change can be used when existing changes are either don't exist, are not
8    * flexible enough, or buggy.
9    */
10  public class RawSQLChange extends AbstractSQLChange {
11  
12      private String comments;
13  
14      public RawSQLChange() {
15          super("sql", "Custom SQL", ChangeMetaData.PRIORITY_DEFAULT);
16      }
17  
18      public RawSQLChange(String sql) {
19          this();
20          setSql(sql);
21      }
22  
23      public String getComments() {
24          return comments;
25      }
26  
27      public void setComments(String comments) {
28          this.comments = comments;
29      }
30  
31      public String getConfirmationMessage() {
32          return "Custom SQL executed";
33      }
34  }