mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 17:27:40 +00:00
add ignore type script
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
import { Knex } from "knex";
|
import { Knex } from "knex";
|
||||||
|
|
||||||
import { TableName } from "../schemas";
|
import { TableName } from "../schemas";
|
||||||
@@ -8,15 +10,12 @@ export async function up(knex: Knex): Promise<void> {
|
|||||||
await knex.schema.alterTable(TableName.SuperAdmin, (t) => {
|
await knex.schema.alterTable(TableName.SuperAdmin, (t) => {
|
||||||
t.uuid("instanceId").notNullable().defaultTo(knex.fn.uuid());
|
t.uuid("instanceId").notNullable().defaultTo(knex.fn.uuid());
|
||||||
});
|
});
|
||||||
|
// eslint-disable-next-line
|
||||||
// this is updated to avoid race condition on replication
|
|
||||||
/* eslint-disable */
|
|
||||||
await knex(TableName.SuperAdmin)
|
await knex(TableName.SuperAdmin)
|
||||||
.update({ id: ADMIN_CONFIG_UUID })
|
.update({ id: ADMIN_CONFIG_UUID })
|
||||||
.whereNotNull("id")
|
.whereNotNull("id")
|
||||||
.andWhere("id", "<>", ADMIN_CONFIG_UUID)
|
.andWhere("id", "<>", ADMIN_CONFIG_UUID)
|
||||||
.limit(1);
|
.limit(1);
|
||||||
/* eslint-enable */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function down(knex: Knex): Promise<void> {
|
export async function down(knex: Knex): Promise<void> {
|
||||||
|
|||||||
Reference in New Issue
Block a user