mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-03 12:26:05 +00:00
fix: removed exported field
This commit is contained in:
@@ -4,12 +4,10 @@ import { TableName } from "../schemas";
|
|||||||
|
|
||||||
export async function up(knex: Knex): Promise<void> {
|
export async function up(knex: Knex): Promise<void> {
|
||||||
const hasEncryptionStrategy = await knex.schema.hasColumn(TableName.KmsServerRootConfig, "encryptionStrategy");
|
const hasEncryptionStrategy = await knex.schema.hasColumn(TableName.KmsServerRootConfig, "encryptionStrategy");
|
||||||
const hasExported = await knex.schema.hasColumn(TableName.KmsServerRootConfig, "exported");
|
|
||||||
const hasTimestampsCol = await knex.schema.hasColumn(TableName.KmsServerRootConfig, "createdAt");
|
const hasTimestampsCol = await knex.schema.hasColumn(TableName.KmsServerRootConfig, "createdAt");
|
||||||
|
|
||||||
await knex.schema.alterTable(TableName.KmsServerRootConfig, (t) => {
|
await knex.schema.alterTable(TableName.KmsServerRootConfig, (t) => {
|
||||||
if (!hasEncryptionStrategy) t.string("encryptionStrategy").defaultTo("BASIC");
|
if (!hasEncryptionStrategy) t.string("encryptionStrategy").defaultTo("BASIC");
|
||||||
if (!hasExported) t.boolean("exported").defaultTo(false);
|
|
||||||
if (!hasTimestampsCol) t.timestamps(true, true, true);
|
if (!hasTimestampsCol) t.timestamps(true, true, true);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -17,11 +15,9 @@ export async function up(knex: Knex): Promise<void> {
|
|||||||
export async function down(knex: Knex): Promise<void> {
|
export async function down(knex: Knex): Promise<void> {
|
||||||
const hasEncryptionStrategy = await knex.schema.hasColumn(TableName.KmsServerRootConfig, "encryptionStrategy");
|
const hasEncryptionStrategy = await knex.schema.hasColumn(TableName.KmsServerRootConfig, "encryptionStrategy");
|
||||||
const hasTimestampsCol = await knex.schema.hasColumn(TableName.KmsServerRootConfig, "createdAt");
|
const hasTimestampsCol = await knex.schema.hasColumn(TableName.KmsServerRootConfig, "createdAt");
|
||||||
const hasExported = await knex.schema.hasColumn(TableName.KmsServerRootConfig, "exported");
|
|
||||||
|
|
||||||
await knex.schema.alterTable(TableName.KmsServerRootConfig, (t) => {
|
await knex.schema.alterTable(TableName.KmsServerRootConfig, (t) => {
|
||||||
if (hasEncryptionStrategy) t.dropColumn("encryptionStrategy");
|
if (hasEncryptionStrategy) t.dropColumn("encryptionStrategy");
|
||||||
if (hasTimestampsCol) t.dropTimestamps(true);
|
if (hasTimestampsCol) t.dropTimestamps(true);
|
||||||
if (hasExported) t.dropColumn("exported");
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ export const KmsRootConfigSchema = z.object({
|
|||||||
id: z.string().uuid(),
|
id: z.string().uuid(),
|
||||||
encryptedRootKey: zodBuffer,
|
encryptedRootKey: zodBuffer,
|
||||||
encryptionStrategy: z.string(),
|
encryptionStrategy: z.string(),
|
||||||
exported: z.boolean(),
|
|
||||||
createdAt: z.date(),
|
createdAt: z.date(),
|
||||||
updatedAt: z.date()
|
updatedAt: z.date()
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ export const getDefaultOnPremFeatures = (): TFeatureSet => ({
|
|||||||
auditLogStreams: false,
|
auditLogStreams: false,
|
||||||
auditLogStreamLimit: 3,
|
auditLogStreamLimit: 3,
|
||||||
samlSSO: false,
|
samlSSO: false,
|
||||||
hsm: true,
|
hsm: false,
|
||||||
oidcSSO: false,
|
oidcSSO: false,
|
||||||
scim: false,
|
scim: false,
|
||||||
ldap: false,
|
ldap: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user