create database and customer table if it does not exist
This commit is contained in:
parent
25101f14e7
commit
ec0f67784b
|
@ -88,4 +88,4 @@ local.properties
|
|||
*.launch
|
||||
|
||||
# SQLite
|
||||
/src/main/resources/*.db
|
||||
prototype/src/main/resources/*.db
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
Reference in New Issue