public class CheckDBVersionPlugin
This class connects to a data base, checks the db for the presense of specific schema, and writes a file to the output directory indicating presence or absence of the queried schema.
This is used to determine if liquibase should run. Liquibase is initially run on a version of the PHG db that contains the "variants" table. IF this table is not present, this version of liquibase will not run, and user will be instructed to use an older PHG version for connecting.
Version 2: The variants and alleles tables have been removed. We now run liquibase based on there NOT being a variants table.
The table or fields in a table that are checked will change as the db schema changes. There will be a new version of a Liquibase Docker created when ever the PHG db schema changes enough that liquibase alone cannot update the data. IE, the PHG code will branch and the list of changesets will start fresh. For example: The change to add variants as "list" vs List" with the addition of the variants and alleles tables was major. Any changes similar to this, where the internal data types change, will require a new PHG and PHG liquibase branch.
Details of this Plugin:
connect to DB
query db for specified schema
write file to output directory:
/run_yes.txt OR
/run_no.txt run_yes.txt has 1 line that says "yes" run_no.txt has 1 line that says "no" with details on which table/columns are missing Presence of "run_yes.txt file is all that is needed to run liquibase update (called via another script)
public CheckDBVersionPlugin(@Nullable java.awt.Frame parentFrame, boolean isInteractive)
This class connects to a data base, checks the db for the presense of specific schema, and writes a file to the output directory indicating presence or absence of the queried schema.
This is used to determine if liquibase should run. Liquibase is initially run on a version of the PHG db that contains the "variants" table. IF this table is not present, this version of liquibase will not run, and user will be instructed to use an older PHG version for connecting.
Version 2: The variants and alleles tables have been removed. We now run liquibase based on there NOT being a variants table.
The table or fields in a table that are checked will change as the db schema changes. There will be a new version of a Liquibase Docker created when ever the PHG db schema changes enough that liquibase alone cannot update the data. IE, the PHG code will branch and the list of changesets will start fresh. For example: The change to add variants as "list" vs List" with the addition of the variants and alleles tables was major. Any changes similar to this, where the internal data types change, will require a new PHG and PHG liquibase branch.
Details of this Plugin:
connect to DB
query db for specified schema
write file to output directory:
/run_yes.txt OR
/run_no.txt run_yes.txt has 1 line that says "yes" run_no.txt has 1 line that says "no" with details on which table/columns are missing Presence of "run_yes.txt file is all that is needed to run liquibase update (called via another script)
@Nullable public net.maizegenetics.plugindef.DataSet processData(@Nullable net.maizegenetics.plugindef.DataSet input)
@Nullable public javax.swing.ImageIcon getIcon()
@NotNull public java.lang.String getButtonName()
@NotNull public java.lang.String getToolTipText()
@NotNull public java.lang.String outputDir()
Directory path to output file indicating whether to run liquibase.
@NotNull public CheckDBVersionPlugin outputDir(@NotNull java.lang.String value)
Set Output Directory. Directory path to output file indicating whether to run liquibase.
value
- Output Directory