create database and customer table if it does not exist

This commit is contained in:
Jannik 2020-01-15 20:30:48 +01:00
parent 25101f14e7
commit ec0f67784b
Signed by: Seil0
GPG Key ID: E8459F3723C52C24
3 changed files with 4 additions and 2 deletions

2
.gitignore vendored
View File

@ -88,4 +88,4 @@ local.properties
*.launch
# SQLite
/src/main/resources/*.db
prototype/src/main/resources/*.db

View File

@ -7,7 +7,8 @@ import javax.persistence.*;
public class Customer {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@GeneratedValue(strategy=GenerationType.SEQUENCE, generator = "id_Sequence")
@SequenceGenerator(name = "id_Sequence", sequenceName = "ID_SEQ")
public Long id;
public String lastname;
public String firstname;

View File

@ -9,6 +9,7 @@ logging.level.org.springframework.web=INFO
spring.datasource.url = jdbc:sqlite:src/main/resources/test.db
spring.datasource.driverClassName = org.sqlite.JDBC
spring.jpa.properties.hibernate.dialect = org.hso.ecommerce.db.SQLiteDialect
spring.jpa.hibernate.ddl-auto=update
# ----------------------------------------
# WEB PROPERTIES