Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 9 additions & 12 deletions src/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ export class Configuration {
};

database: TypeOrmModuleOptions = {
type: 'mssql',
type: 'postgres',
host: process.env.SQL_HOST,
port: Number.parseInt(process.env.SQL_PORT),
username: process.env.SQL_USERNAME,
Expand All @@ -220,18 +220,15 @@ export class Configuration {
synchronize: process.env.SQL_SYNCHRONIZE === 'true',
migrationsRun: process.env.SQL_MIGRATE === 'true',
migrations: ['migration/*.js'],
connectionTimeout: 30000,
requestTimeout: 60000,
pool: {
min: +(process.env.SQL_POOL_MIN ?? 5),
max: +(process.env.SQL_POOL_MAX ?? 10),
idleTimeoutMillis: +(process.env.SQL_POOL_IDLE_TIMEOUT ?? 30000),
},
connectTimeoutMS: 30000,
poolSize: +(process.env.SQL_POOL_MAX ?? 10),
logging: process.env.SQL_LOGGING as LoggerOptions,
options: {
encrypt: process.env.SQL_ENCRYPT !== 'false',
trustServerCertificate: process.env.SQL_ENCRYPT === 'false',
},
ssl:
process.env.SQL_SSL === 'false'
? false
: {
rejectUnauthorized: false,
},
};

i18n: I18nOptions = {
Expand Down
6 changes: 3 additions & 3 deletions src/integration/exchange/entities/exchange-tx.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ export class ExchangeTx extends IEntity {
@Column({ length: 256 })
externalId: string;

@Column({ type: 'datetime2', nullable: true })
@Column({ type: 'timestamp', nullable: true })
externalCreated?: Date;

@Column({ type: 'datetime2', nullable: true })
@Column({ type: 'timestamp', nullable: true })
externalUpdated?: Date;

@Column({ length: 256, nullable: true })
Expand Down Expand Up @@ -60,7 +60,7 @@ export class ExchangeTx extends IEntity {
@Column({ length: 256, nullable: true })
currency?: string;

@Column({ length: 'MAX', nullable: true })
@Column({ type: 'text', nullable: true })
address?: string;

@Column({ length: 256, nullable: true })
Expand Down
4 changes: 2 additions & 2 deletions src/integration/sift/entities/sift-error-log.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export class SiftErrorLog extends IEntity {
@Column({ type: 'int', nullable: true })
httpStatusCode?: number;

@Column({ length: 'MAX' })
@Column({ type: 'text' })
errorMessage: string;

@Column({ type: 'int' })
Expand All @@ -22,6 +22,6 @@ export class SiftErrorLog extends IEntity {
@Column({ default: false })
isTimeout: boolean;

@Column({ length: 'MAX', nullable: true })
@Column({ type: 'text', nullable: true })
requestPayload?: string;
}
2 changes: 1 addition & 1 deletion src/shared/models/country/country.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export class Country extends IEntity {
@Column({ default: false })
manualReviewRequiredOrganization: boolean;

@Column({ length: 'MAX', nullable: true })
@Column({ type: 'text', nullable: true })
enabledKycDocuments: string; // semicolon separated KycDocuments

get enabledKycDocumentList(): IdentDocumentType[] {
Expand Down
2 changes: 1 addition & 1 deletion src/shared/models/fiat/fiat.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class Fiat extends IEntity {
@Column({ default: AmlRule.DEFAULT })
amlRuleTo: AmlRule;

@Column({ length: 'MAX', nullable: true })
@Column({ type: 'text', nullable: true })
ibanCountryConfig?: string; // JSON string

get ibanCountryConfigObject(): IbanCountryConfig | undefined {
Expand Down
4 changes: 2 additions & 2 deletions src/shared/models/reward.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class Reward extends IEntity {
@Column({ length: 256, nullable: true })
txId?: string;

@Column({ type: 'datetime2', nullable: true })
@Column({ type: 'timestamp', nullable: true })
outputDate?: Date;

@Column({ type: 'float', nullable: true })
Expand All @@ -42,6 +42,6 @@ export class Reward extends IEntity {
@Column({ length: 256, nullable: true })
recipientMail?: string;

@Column({ type: 'datetime2', nullable: true })
@Column({ type: 'timestamp', nullable: true })
mailSendDate?: Date;
}
2 changes: 1 addition & 1 deletion src/shared/models/setting/setting.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ export class Setting extends IEntity {
@Column({ length: 256, unique: true })
key: string;

@Column({ length: 'MAX' })
@Column({ type: 'text' })
value: string;
}
Loading
Loading