Skip to content

Commit 60a62c5

Browse files
fix
1 parent 83a8de7 commit 60a62c5

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

packages/server/api/src/app/database/seeds/openops-opportunities-table-new-fields-seed.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { SEED_OPENOPS_TABLE_NAME } from '../../openops-tables/template-tables/cr
1111
import { databaseConnection } from '../database-connection';
1212
import { applyToEachTablesDatabase } from './tables-database-iterator';
1313

14-
const OPPORTUNITIES_NEW_FIELDS_SEED = 'OPP_NEW_FIELDS_SEED';
14+
export const OPPORTUNITIES_NEW_FIELDS_SEED = 'OPP_NEW_FIELDS_SEED';
1515

1616
const alreadyApplied = async (): Promise<boolean> => {
1717
const flagRepo = databaseConnection().getRepository(FlagEntity);

packages/server/api/src/app/database/seeds/openops-opportunities-table-seed.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
SEED_OPENOPS_TABLE_NAME,
77
} from '../../openops-tables/template-tables/create-opportunities-table';
88
import { databaseConnection } from '../database-connection';
9+
import { OPPORTUNITIES_NEW_FIELDS_SEED } from './openops-opportunities-table-new-fields-seed';
910
import { applyToEachTablesDatabase } from './tables-database-iterator';
1011

1112
const OPPORTUNITIES_TABLE_SEED = 'OPPORTUNITIESSEED';
@@ -49,4 +50,7 @@ export const seedOpportunitesTemplateTable = async (): Promise<void> => {
4950
);
5051

5152
await setTableSeedFlag();
53+
54+
const flagRepo = databaseConnection().getRepository(FlagEntity);
55+
await flagRepo.save({ id: OPPORTUNITIES_NEW_FIELDS_SEED, value: true });
5256
};

0 commit comments

Comments
 (0)