mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-05 23:26:42 +00:00
More columns
This commit is contained in:
@@ -15,6 +15,15 @@ export async function up(knex: Knex): Promise<void> {
|
|||||||
await createOnUpdateTrigger(knex, TableName.PkiAcmeEnrollmentConfig);
|
await createOnUpdateTrigger(knex, TableName.PkiAcmeEnrollmentConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!(await knex.schema.hasColumn(TableName.PkiCertificateProfile, "acmeConfigId"))) {
|
||||||
|
await knex.schema.alterTable(TableName.PkiCertificateProfile, (t) => {
|
||||||
|
t.uuid("acmeConfigId");
|
||||||
|
t.foreign("acmeConfigId").references("id").inTable(TableName.PkiAcmeEnrollmentConfig).onDelete("SET NULL");
|
||||||
|
t.index("acmeConfigId");
|
||||||
|
});
|
||||||
|
// TODO: should update (or add?) the constraints to check at least one of the enrollment config id is set
|
||||||
|
}
|
||||||
|
|
||||||
// Create PkiAcmeAccount table
|
// Create PkiAcmeAccount table
|
||||||
if (!(await knex.schema.hasTable(TableName.PkiAcmeAccount))) {
|
if (!(await knex.schema.hasTable(TableName.PkiAcmeAccount))) {
|
||||||
await knex.schema.createTable(TableName.PkiAcmeAccount, (t) => {
|
await knex.schema.createTable(TableName.PkiAcmeAccount, (t) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user