[BAEL-3841] put back the *.sql initialisation files
This commit is contained in:
parent
d85c4371fb
commit
32d6f7df6c
|
@ -67,6 +67,11 @@
|
|||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-jpa</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.bytebuddy</groupId>
|
||||
<artifactId>byte-buddy</artifactId>
|
||||
<version>1.10.10</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.data</groupId>
|
||||
<artifactId>spring-data-commons</artifactId>
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
INSERT INTO CUSTOMER VALUES(1001,'BAELDUNG');
|
||||
|
||||
INSERT INTO ITEM VALUES(10001,'ITEM1',50.0);
|
||||
INSERT INTO ITEM VALUES(10002,'ITEM2',100.0);
|
||||
|
||||
INSERT INTO ORDERDETAIL VALUES(300001,1001,10001,2);
|
||||
INSERT INTO ORDERDETAIL VALUES(300002,1001,10002,5);
|
|
@ -0,0 +1,23 @@
|
|||
DROP TABLE ORDERDETAIL IF EXISTS;
|
||||
DROP TABLE ITEM IF EXISTS;
|
||||
DROP TABLE CUSTOMER IF EXISTS;
|
||||
|
||||
CREATE TABLE CUSTOMER(
|
||||
CUSTOMERID INT PRIMARY KEY,
|
||||
CUSTOMERNAME VARCHAR(250) NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE ITEM(
|
||||
ITEMID INT PRIMARY KEY,
|
||||
ITEMDESC VARCHAR(250),
|
||||
PRICE DOUBLE
|
||||
);
|
||||
|
||||
CREATE TABLE ORDERDETAIL(
|
||||
ORDERID INT PRIMARY KEY,
|
||||
CUSTOMERID INT NOT NULL,
|
||||
ITEMID INT NOT NULL,
|
||||
QUANTITY INT,
|
||||
FOREIGN KEY (customerid) references CUSTOMER(customerid),
|
||||
FOREIGN KEY (itemid) references ITEM(itemid)
|
||||
);
|
Loading…
Reference in New Issue