Adding more columns for users.

master
Tomasz Półgrabia 2021-01-06 12:46:42 +01:00
parent ad5e842008
commit 3d5b27d91e
4 changed files with 37 additions and 2 deletions
spring-showcase-web
src/main
java/ch/polgrabia/springshowcaseweb/models
resources/db/migration

View File

@ -4,4 +4,3 @@
springshowcase.flyway.url=jdbc:postgresql://localhost:5432/test
springshowcase.flyway.username=test
springshowcase.flyway.password=test
springshowcase.flyway.schemas=test

View File

@ -27,5 +27,4 @@ flyway {
url = project.ext['springshowcase.flyway.url']
user = project.ext['springshowcase.flyway.username']
password = project.ext['springshowcase.flyway.password']
schemas = project.ext['springshowcase.flyway.schemas']
}

View File

@ -13,9 +13,18 @@ public class User {
@Column(name = "user_name")
private String userName;
@Column(name = "password")
private String password;
@Column(name = "first_name")
private String firstName;
@Column(name = "last_name")
private String lastName;
@Column(name = "email")
private String email;
public Long getId() {
return id;
}
@ -39,4 +48,28 @@ public class User {
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
}

View File

@ -0,0 +1,4 @@
alter table users
add column last_name text not null default '',
add column password varchar(256) not null default '',
add column email text not null default ''