mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-19 22:20:36 +00:00
remove trigger functions
This commit is contained in:
@@ -1,9 +1,5 @@
|
||||
import { Knex } from "knex";
|
||||
|
||||
import {
|
||||
createKmsKeyNameSyncTrigger,
|
||||
dropKmsKeyNameSyncTrigger
|
||||
} from "@app/db/migrations/utils/kmsKeySlugNameTransition";
|
||||
import { TableName } from "@app/db/schemas";
|
||||
|
||||
export async function up(knex: Knex): Promise<void> {
|
||||
@@ -17,8 +13,6 @@ export async function up(knex: Knex): Promise<void> {
|
||||
table.string("slug", 32);
|
||||
})
|
||||
.then(() => knex(TableName.KmsKey).update("slug", knex.ref("name")));
|
||||
|
||||
await createKmsKeyNameSyncTrigger(knex);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -28,8 +22,6 @@ export async function down(knex: Knex): Promise<void> {
|
||||
const hasSlug = await knex.schema.hasColumn(TableName.KmsKey, "slug");
|
||||
|
||||
if (hasSlug) {
|
||||
await dropKmsKeyNameSyncTrigger(knex);
|
||||
|
||||
await knex.schema.alterTable(TableName.KmsKey, (table) => {
|
||||
table.dropColumn("slug");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user