MCPcopy Create free account
hub / github.com/subquery/subql / create

Method create

packages/node-core/src/db/migration-service/migration.ts:74–88  ·  view source on GitHub ↗
(
    sequelize: Sequelize,
    storeService: StoreService,
    schemaName: string,
    config: NodeConfig
  )

Source from the content-addressed store, hash-verified

72 }
73
74 static async create(
75 sequelize: Sequelize,
76 storeService: StoreService,
77 schemaName: string,
78 config: NodeConfig
79 ): Promise<Migration> {
80 const existingForeignKeys = await syncHelper.getExistingForeignKeys(schemaName, sequelize);
81 const enumTypeMap = await syncHelper.getExistingEnums(schemaName, sequelize);
82 const indexesResult = (await sequelize.query(syncHelper.getExistedIndexesQuery(schemaName), {
83 type: QueryTypes.SELECT,
84 })) as {
85 indexname: string;
86 }[];
87 return new Migration(sequelize, storeService, schemaName, config, existingForeignKeys, enumTypeMap, indexesResult);
88 }
89
90 async run(transaction: Transaction): Promise<ModifiedDbModels> {
91 if (this.historical) {

Callers 1

runMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected