generated from liquibase/liquibase-extension-example
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. Finished Contributed Tests (loadUpdateData, etc.) 2. Make GitActions do each testing level in series to not disturb the others
- Loading branch information
1 parent
ee0a6f5
commit f22c235
Showing
23 changed files
with
413 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
src/main/java/liquibase/ext/databricks/sqlgenerator/AddAutoIncrementGeneratorDatabricks.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package liquibase.ext.databricks.sqlgenerator; | ||
|
||
import liquibase.ext.databricks.database.DatabricksDatabase; | ||
import liquibase.database.Database; | ||
import liquibase.exception.ValidationErrors; | ||
import liquibase.sqlgenerator.SqlGeneratorChain; | ||
import liquibase.sqlgenerator.core.AddAutoIncrementGenerator; | ||
import liquibase.statement.core.AddAutoIncrementStatement; | ||
|
||
public class AddAutoIncrementGeneratorDatabricks extends AddAutoIncrementGenerator { | ||
|
||
@Override | ||
public int getPriority() { | ||
return DatabricksDatabase.PRIORITY_DATABASE; | ||
} | ||
|
||
@Override | ||
public boolean supports(AddAutoIncrementStatement statement, Database database) { | ||
return super.supports(statement, database) | ||
&& database instanceof DatabricksDatabase; | ||
} | ||
|
||
@Override | ||
public ValidationErrors validate(AddAutoIncrementStatement statement, | ||
Database database, SqlGeneratorChain sqlGeneratorChain) { | ||
return new ValidationErrors().addError("Databricks does not support adding AUTO_INCREMENT."); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
...in/java/liquibase/ext/databricks/sqlgenerator/AddUniqueConstraintGeneratorDatabricks.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package liquibase.ext.databricks.sqlgenerator; | ||
|
||
|
||
import liquibase.ext.databricks.database.DatabricksDatabase; | ||
import liquibase.database.Database; | ||
import liquibase.exception.ValidationErrors; | ||
import liquibase.sqlgenerator.SqlGeneratorChain; | ||
import liquibase.sqlgenerator.core.AddUniqueConstraintGenerator; | ||
import liquibase.statement.core.AddUniqueConstraintStatement; | ||
|
||
public class AddUniqueConstraintGeneratorDatabricks extends AddUniqueConstraintGenerator { | ||
|
||
@Override | ||
public int getPriority() { | ||
return DatabricksDatabase.PRIORITY_DATABASE; | ||
} | ||
|
||
@Override | ||
public boolean supports(AddUniqueConstraintStatement statement, Database database) { | ||
return super.supports(statement, database) | ||
&& database instanceof DatabricksDatabase; | ||
} | ||
|
||
@Override | ||
public ValidationErrors validate(AddUniqueConstraintStatement statement, | ||
Database database, SqlGeneratorChain sqlGeneratorChain) { | ||
return new ValidationErrors().addError( | ||
"Databricks does not support altering unique constraint key."); | ||
} | ||
} |
Oops, something went wrong.