2626import net .sf .jsqlparser .statement .Statement ;
2727import net .sf .jsqlparser .statement .StatementVisitor ;
2828import net .sf .jsqlparser .statement .create .table .ColDataType ;
29- import net .sf .jsqlparser .statement .create .table .ForeignKeyIndex ;
29+ import net .sf .jsqlparser .statement .create .table .Index ;
3030import net .sf .jsqlparser .statement .select .PlainSelect ;
3131
3232/**
@@ -41,7 +41,7 @@ public class Alter implements Statement {
4141 private List <String > pkColumns ;
4242 private List <String > ukColumns ;
4343 private String ukName ;
44- private ForeignKeyIndex fkIndex = null ;
44+ private Index index = null ;
4545 private String operation ;
4646 private String constraintName ;
4747 private boolean onDeleteRestrict ;
@@ -168,12 +168,12 @@ public void accept(StatementVisitor statementVisitor) {
168168 statementVisitor .visit (this );
169169 }
170170
171- public ForeignKeyIndex getFkIndex () {
172- return fkIndex ;
171+ public Index getIndex () {
172+ return index ;
173173 }
174174
175- public void setFkIndex ( ForeignKeyIndex fkIndex ) {
176- this .fkIndex = fkIndex ;
175+ public void setIndex ( Index index ) {
176+ this .index = index ;
177177 }
178178
179179 @ Override
@@ -201,8 +201,8 @@ public String toString() {
201201 } else if (isOnDeleteSetNull ()) {
202202 b .append (" ON DELETE SET NULL" );
203203 }
204- } else if (fkIndex != null ) {
205- b .append (fkIndex );
204+ } else if (index != null ) {
205+ b .append (index );
206206 }
207207 return b .toString ();
208208 }
0 commit comments