mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-09 21:28:27 +00:00
Make column not nullable
This commit is contained in:
@@ -36,7 +36,7 @@ def step_impl(context: Context, profile_var: str):
|
|||||||
# TODO: Fixed value for now, just to make test much easier,
|
# TODO: Fixed value for now, just to make test much easier,
|
||||||
# we should call infisical API to create such profile instead
|
# we should call infisical API to create such profile instead
|
||||||
# in the future
|
# in the future
|
||||||
profile_id = "c051e74c-48a7-4724-832c-d5b496698546"
|
profile_id = "40dd4794-66e3-4bd3-9875-c1f819804bb2"
|
||||||
context.vars[profile_var] = AcmeProfile(profile_id)
|
context.vars[profile_var] = AcmeProfile(profile_id)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,10 @@ export async function up(knex: Knex): Promise<void> {
|
|||||||
if (await knex.schema.hasColumn(TableName.PkiCertificateProfile, "enrollmentType")) {
|
if (await knex.schema.hasColumn(TableName.PkiCertificateProfile, "enrollmentType")) {
|
||||||
// Notice: it's okay to use `.checkIn(...).alter();` here because the constraint name is all lowercase.
|
// Notice: it's okay to use `.checkIn(...).alter();` here because the constraint name is all lowercase.
|
||||||
await knex.schema.alterTable(TableName.PkiCertificateProfile, (t) => {
|
await knex.schema.alterTable(TableName.PkiCertificateProfile, (t) => {
|
||||||
t.string("enrollmentType").checkIn(["api", "est", "acme"], NEW_ENROLLMENT_TYPE_CHECK_CONSTRAINT).alter();
|
t.string("enrollmentType")
|
||||||
|
.notNullable()
|
||||||
|
.checkIn(["api", "est", "acme"], NEW_ENROLLMENT_TYPE_CHECK_CONSTRAINT)
|
||||||
|
.alter();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user