Skip to content

Commit

Permalink
Merge pull request #1369 from multiversx/SERVICES-2709-remove-support…
Browse files Browse the repository at this point in the history
…-for-postgres

remove postgres support
  • Loading branch information
dragos-rebegea authored Nov 4, 2024
2 parents 62cef99 + 9824c2c commit adaed8c
Show file tree
Hide file tree
Showing 30 changed files with 3 additions and 2,257 deletions.
19 changes: 3 additions & 16 deletions src/common/indexer/indexer.module.ts
Original file line number Diff line number Diff line change
@@ -1,34 +1,21 @@
import { DynamicModule, Global, Module, Type } from "@nestjs/common";
import configuration from "config/configuration";
import { DynamicModule, Global, Module } from "@nestjs/common";
import { ElasticIndexerModule } from "./elastic/elastic.indexer.module";
import { ElasticIndexerService } from "./elastic/elastic.indexer.service";
import { IndexerInterface } from "./indexer.interface";
import { IndexerService } from "./indexer.service";
import { PostgresIndexerModule } from "./postgres/postgres.indexer.module";
import { PostgresIndexerService } from "./postgres/postgres.indexer.service";

@Global()
@Module({})
export class IndexerModule {
static register(): DynamicModule {
let indexerModule: Type<any> = ElasticIndexerModule;
let indexerInterface: Type<IndexerInterface> = ElasticIndexerService;

const isPostgres = configuration().indexer?.type === 'postgres';
if (isPostgres) {
indexerModule = PostgresIndexerModule;
indexerInterface = PostgresIndexerService;
}

return {
module: IndexerModule,
imports: [
indexerModule,
ElasticIndexerModule,
],
providers: [
{
provide: 'IndexerInterface',
useClass: indexerInterface,
useClass: ElasticIndexerService,
},
IndexerService,
],
Expand Down
26 changes: 0 additions & 26 deletions src/common/indexer/postgres/entities/account.db.ts

This file was deleted.

34 changes: 0 additions & 34 deletions src/common/indexer/postgres/entities/account.esdt.db.ts

This file was deleted.

28 changes: 0 additions & 28 deletions src/common/indexer/postgres/entities/account.esdt.history.db.ts

This file was deleted.

28 changes: 0 additions & 28 deletions src/common/indexer/postgres/entities/account.history.db.ts

This file was deleted.

98 changes: 0 additions & 98 deletions src/common/indexer/postgres/entities/block.db.ts

This file was deleted.

19 changes: 0 additions & 19 deletions src/common/indexer/postgres/entities/delegator.db.ts

This file was deleted.

13 changes: 0 additions & 13 deletions src/common/indexer/postgres/entities/epoch.info.db.ts

This file was deleted.

31 changes: 0 additions & 31 deletions src/common/indexer/postgres/entities/epoch.start.info.db.ts

This file was deleted.

20 changes: 0 additions & 20 deletions src/common/indexer/postgres/entities/event.db.ts

This file was deleted.

Loading

0 comments on commit adaed8c

Please sign in to comment.