
com.whiteclarkegroup.liquibaselinter.config.rules.specific.CreateColumnNoDefinePrimaryKey Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of liquibase-linter Show documentation
Show all versions of liquibase-linter Show documentation
Liquibase extension to add configurable script linting
package com.whiteclarkegroup.liquibaselinter.config.rules.specific;
import com.whiteclarkegroup.liquibaselinter.config.rules.Rule;
import com.whiteclarkegroup.liquibaselinter.config.rules.RuleConfig;
import liquibase.change.Change;
import liquibase.change.ConstraintsConfig;
public class CreateColumnNoDefinePrimaryKey extends Rule {
public CreateColumnNoDefinePrimaryKey(RuleConfig ruleConfig) {
super(ruleConfig);
}
@Override
public boolean invalid(ConstraintsConfig constraints, Change change) {
return constraints == null || (constraints.isPrimaryKey() != null && constraints.isPrimaryKey());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy