diff --git a/src/main/java/cryptosky/me/graphql/pricing/models/entities/CryptoPriceModel.java b/src/main/java/cryptosky/me/graphql/pricing/models/entities/CryptoPriceModel.java index 55e4433..39fcd56 100644 --- a/src/main/java/cryptosky/me/graphql/pricing/models/entities/CryptoPriceModel.java +++ b/src/main/java/cryptosky/me/graphql/pricing/models/entities/CryptoPriceModel.java @@ -12,8 +12,8 @@ import java.time.LocalDateTime; public class CryptoPriceModel { @Id - @Column(name = "ID", nullable = false) - @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "ID", nullable = false, unique = true) + @GeneratedValue(strategy = GenerationType.AUTO) private int id; @Column(name = "timestamp", nullable = false) diff --git a/src/main/resources/graphql/configQL.graphqls b/src/main/resources/graphql/configQL.graphqls index c372e21..69a6752 100644 --- a/src/main/resources/graphql/configQL.graphqls +++ b/src/main/resources/graphql/configQL.graphqls @@ -37,5 +37,4 @@ type Query { type Mutation { createBtc(createdDate: String!, type: String!, average_price: Float!, high_price: Float, low_price: Float, open_price: Float, close_price: Float, volume: Float):BtcPrice createTweet(createdDate: String!, rawTweet: String!, sentimentScore: Float!, positiveScore: Float, neutralScore: Float, negativeScore: Float, compoundScore: Float!):tweetModel - } \ No newline at end of file