misc: remove not nullable from alter

This commit is contained in:
Sheen Capadngan
2024-11-12 02:35:21 +08:00
parent 027b200b1a
commit c649661133

View File

@@ -27,15 +27,9 @@ export async function down(knex: Knex): Promise<void> {
"disableBootstrapCertValidation"
);
const hasCaChainCol = await knex.schema.hasColumn(TableName.CertificateTemplateEstConfig, "encryptedCaChain");
await knex.schema.alterTable(TableName.CertificateTemplateEstConfig, (t) => {
if (hasDisableBootstrapCertValidationCol) {
t.dropColumn("disableBootstrapCertValidation");
}
if (hasCaChainCol) {
t.binary("encryptedCaChain").notNullable().alter();
}
});
}