From dd941eb5d594eef99e921151fb9fbb4793757229 Mon Sep 17 00:00:00 2001 From: mrfoxygmfr Date: Sun, 23 Mar 2025 15:15:06 +0300 Subject: fix(db): fix auto increment for ids --- .../java/ru/mrfoxygmfr/warehouse_accounting/db/models/Operation.java | 2 +- .../ru/mrfoxygmfr/warehouse_accounting/db/models/OperationProducts.java | 2 +- src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/Partner.java | 2 +- .../ru/mrfoxygmfr/warehouse_accounting/db/models/PartnerContact.java | 2 +- src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/Product.java | 2 +- .../java/ru/mrfoxygmfr/warehouse_accounting/db/models/ProductSlots.java | 2 +- .../java/ru/mrfoxygmfr/warehouse_accounting/db/models/StorageSlot.java | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/Operation.java b/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/Operation.java index 1f5b911..51b8bbd 100644 --- a/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/Operation.java +++ b/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/Operation.java @@ -16,7 +16,7 @@ import java.util.Set; @AllArgsConstructor public class Operation { @Id - @GeneratedValue(strategy = GenerationType.AUTO) + @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(nullable = false, name = "id") private int id; diff --git a/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/OperationProducts.java b/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/OperationProducts.java index 0842437..837e42e 100644 --- a/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/OperationProducts.java +++ b/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/OperationProducts.java @@ -13,7 +13,7 @@ import lombok.*; @AllArgsConstructor public class OperationProducts { @Id - @GeneratedValue(strategy = GenerationType.AUTO) + @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(nullable = false, name = "id") private int id; diff --git a/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/Partner.java b/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/Partner.java index 13d24c0..78f203c 100644 --- a/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/Partner.java +++ b/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/Partner.java @@ -15,7 +15,7 @@ import java.util.Set; @AllArgsConstructor public class Partner { @Id - @GeneratedValue(strategy = GenerationType.AUTO) + @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(nullable = false, name = "id") private int id; diff --git a/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/PartnerContact.java b/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/PartnerContact.java index 2299e8e..e25d178 100644 --- a/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/PartnerContact.java +++ b/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/PartnerContact.java @@ -13,7 +13,7 @@ import lombok.*; @AllArgsConstructor public class PartnerContact { @Id - @GeneratedValue(strategy = GenerationType.AUTO) + @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(nullable = false, name = "id") private int id; diff --git a/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/Product.java b/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/Product.java index 3d97271..23c4c6a 100644 --- a/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/Product.java +++ b/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/Product.java @@ -16,7 +16,7 @@ import java.time.Duration; @AllArgsConstructor public class Product { @Id - @GeneratedValue(strategy = GenerationType.AUTO) + @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(nullable = false, name = "id") private int id; diff --git a/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/ProductSlots.java b/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/ProductSlots.java index 4065dc8..6ed814f 100644 --- a/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/ProductSlots.java +++ b/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/ProductSlots.java @@ -15,7 +15,7 @@ import java.sql.Timestamp; @AllArgsConstructor public class ProductSlots { @Id - @GeneratedValue(strategy = GenerationType.AUTO) + @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(nullable = false, name = "id") private int id; diff --git a/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/StorageSlot.java b/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/StorageSlot.java index 424cab2..74253c0 100644 --- a/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/StorageSlot.java +++ b/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/StorageSlot.java @@ -13,7 +13,7 @@ import lombok.*; @AllArgsConstructor public class StorageSlot { @Id - @GeneratedValue(strategy = GenerationType.AUTO) + @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(nullable = false, name = "id") private int id; -- cgit mrf-deployment