mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 09:28:06 +00:00
Fix migration column name on check variable
This commit is contained in:
+2
-2
@@ -4,7 +4,7 @@ import { TableName } from "../schemas";
|
|||||||
|
|
||||||
export async function up(knex: Knex): Promise<void> {
|
export async function up(knex: Knex): Promise<void> {
|
||||||
if (await knex.schema.hasTable(TableName.Organization)) {
|
if (await knex.schema.hasTable(TableName.Organization)) {
|
||||||
const hasSecretShareToAnyoneCol = await knex.schema.hasColumn(TableName.Organization, "secretShareToAnyone");
|
const hasSecretShareToAnyoneCol = await knex.schema.hasColumn(TableName.Organization, "secretShareSendToAnyone");
|
||||||
|
|
||||||
if (!hasSecretShareToAnyoneCol) {
|
if (!hasSecretShareToAnyoneCol) {
|
||||||
await knex.schema.alterTable(TableName.Organization, (t) => {
|
await knex.schema.alterTable(TableName.Organization, (t) => {
|
||||||
@@ -16,7 +16,7 @@ export async function up(knex: Knex): Promise<void> {
|
|||||||
|
|
||||||
export async function down(knex: Knex): Promise<void> {
|
export async function down(knex: Knex): Promise<void> {
|
||||||
if (await knex.schema.hasTable(TableName.Organization)) {
|
if (await knex.schema.hasTable(TableName.Organization)) {
|
||||||
const hasSecretShareToAnyoneCol = await knex.schema.hasColumn(TableName.Organization, "secretShareToAnyone");
|
const hasSecretShareToAnyoneCol = await knex.schema.hasColumn(TableName.Organization, "secretShareSendToAnyone");
|
||||||
if (hasSecretShareToAnyoneCol) {
|
if (hasSecretShareToAnyoneCol) {
|
||||||
await knex.schema.alterTable(TableName.Organization, (t) => {
|
await knex.schema.alterTable(TableName.Organization, (t) => {
|
||||||
t.dropColumn("secretShareSendToAnyone");
|
t.dropColumn("secretShareSendToAnyone");
|
||||||
|
|||||||
Reference in New Issue
Block a user