From a832e75c87545ded6d1d6e0f88b3e18e1e802341 Mon Sep 17 00:00:00 2001 From: "a.romanov" Date: Mon, 3 Aug 2020 11:50:01 +0300 Subject: [PATCH] BJ-960: Change accountId type to long --- .../java/com/rbkmoney/scrooge/entity/OperationLogEntity.java | 2 +- src/main/resources/db/migration/V1__1.0.0_init.sql | 2 +- .../rbkmoney/scrooge/repository/OperationLogRepositoryTest.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/rbkmoney/scrooge/entity/OperationLogEntity.java b/src/main/java/com/rbkmoney/scrooge/entity/OperationLogEntity.java index 2b68d91..531c08b 100644 --- a/src/main/java/com/rbkmoney/scrooge/entity/OperationLogEntity.java +++ b/src/main/java/com/rbkmoney/scrooge/entity/OperationLogEntity.java @@ -34,7 +34,7 @@ public class OperationLogEntity implements Serializable { @Type(type = "pgsql_enum") private ValidationError validationError; - private String accountId; + private Long accountId; private Long amountWithSign; private String currencySymbolicCode; private String description; diff --git a/src/main/resources/db/migration/V1__1.0.0_init.sql b/src/main/resources/db/migration/V1__1.0.0_init.sql index fb5d893..0d9efaf 100644 --- a/src/main/resources/db/migration/V1__1.0.0_init.sql +++ b/src/main/resources/db/migration/V1__1.0.0_init.sql @@ -10,7 +10,7 @@ CREATE TABLE IF NOT EXISTS scrooge.operation_log sequence_id BIGINT NOT NULL, plan_operations_count BIGINT NOT NULL, operation_type scrooge.operation_type NOT NULL, - account_id CHARACTER VARYING NOT NULL, + account_id BIGINT NOT NULL, amount_with_sign BIGINT NOT NULL, currency_symbolic_code CHARACTER VARYING NOT NULL, description CHARACTER VARYING NOT NULL, diff --git a/src/test/java/com/rbkmoney/scrooge/repository/OperationLogRepositoryTest.java b/src/test/java/com/rbkmoney/scrooge/repository/OperationLogRepositoryTest.java index 638b113..6e24f10 100644 --- a/src/test/java/com/rbkmoney/scrooge/repository/OperationLogRepositoryTest.java +++ b/src/test/java/com/rbkmoney/scrooge/repository/OperationLogRepositoryTest.java @@ -81,7 +81,7 @@ public class OperationLogRepositoryTest { .creationTime(LocalDateTime.now()) .batchHash(9999L) .amountWithSign(-100L) - .accountId("account_id") + .accountId(1L) .build(); entities.add(entity);