Skip to content
Snippets Groups Projects
Commit c11cd799 authored by Pedro Pablo Cardona Arroyave's avatar Pedro Pablo Cardona Arroyave
Browse files

Name of the colummns were changed to the name of the database.

parent 93473f73
No related branches found
No related tags found
No related merge requests found
......@@ -25,8 +25,8 @@ import lombok.NoArgsConstructor;
public class Allergy{
@Id
@Column(name = "name")
@Column(name = "allergy_name")
String name;
@Column(name = "description")
@Column(name = "allergy_description")
String description;
}
\ No newline at end of file
......@@ -23,9 +23,9 @@ import lombok.NoArgsConstructor;
public class Fridge{
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "fridgeId")
@Column(name = "fridge_id")
long fridgeId;
@Column(name = "groupId")
@Column(name = "group_id")
long groupId;
}
......@@ -23,11 +23,12 @@ import lombok.NoArgsConstructor;
public class Recipe {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "recipe_id")
long id;
@Column(name = "name")
@Column(name = "recipe_name")
String name;
@Column(name = "description")
@Column(name = "recipe_description")
String description;
}
......@@ -24,8 +24,9 @@ import lombok.NoArgsConstructor;
public class ShoppingList {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "shopping_list_id")
long ShoppingListID;
@Column(name = "groupID")
@Column(name = "group_id")
long groupID;
}
......@@ -27,7 +27,7 @@ import java.util.List;
@Builder
public class User implements UserDetails {
@Id
@Column(name = "user_name")
@Column(name = "username")
private String username;
@Column(name = "password")
private String password;
......
......@@ -19,33 +19,6 @@ VALUES
('mike', '{noop}password666', true, 'Mike', 'Taylor', 'USER', 'mike@example.com', '2008-09-09', 5),
('olivia', '{noop}password777', true, 'Olivia', 'Clark', 'USER', 'olivia@example.com', '2010-10-10', 5);
INSERT INTO authorities (username, authority)
VALUES
('john', 'USER'),
('jane', 'ADMIN'),
('bob', 'USER'),
('alice', 'USER'),
('tom', 'USER'),
('sarah', 'USER'),
('david', 'ADMIN'),
('emily', 'USER'),
('mike', 'USER'),
('olivia', 'ADMIN');
INSERT INTO profiles (username, first_name, last_name,email, birthdate, group_id)
VALUES
('john','John','Smith','johnSmith@gmail.com','1998-05-07',1),
('jane','jane','Lee','HappyJane@gmail.com','1973-02-14',1),
('bob','Bob','Garcia','BigGarcia@gmail.com','1958-12-23',2),
('alice','Alice','Lee','johnSmit2h@gmail.com','2002-01-04',2),
('tom','Tom','Johnson','johnSmith3@gmail.com','1993-11-21',3),
('sarah', 'Sarah', 'Taylor', 'sarahTaylor@gmail.com', '1987-09-18',3),
('david', 'David', 'Miller', 'davidMiller@gmail.com', '1979-07-25',4),
('emily', 'Emily', 'Chen', 'emilyChen@gmail.com', '1990-03-12',4),
('mike', 'Mike', 'Johnson', 'mikeJohnson@gmail.com', '1985-06-30',5),
('olivia', 'Olivia', 'Davis', 'oliviaDavis@gmail.com', '2000-10-15',5);
INSERT INTO messages (senderName, group_id, message, is_deleted)
VALUES
('john', 1, 'Hello everyone!', false),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment