add initial simplified schema + h2-console spring-security + h2 password
This commit is contained in:
@ -5,7 +5,7 @@ logging.pattern.console=[${application.name}],%magenta(%-5level), %d{dd-MM-yyyy
|
||||
|
||||
spring.datasource.url=jdbc:h2:mem:blogdb
|
||||
spring.datasource.driverClassName=org.h2.Driver
|
||||
spring.datasource.username=root
|
||||
spring.datasource.username=sa
|
||||
spring.datasource.password=geheim
|
||||
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
|
||||
|
||||
|
||||
4
src/main/resources/data.sql
Normal file
4
src/main/resources/data.sql
Normal file
@ -0,0 +1,4 @@
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
|
||||
insert into TEILNEHMER (VORNAME, NACHNAME, EMAIL) values
|
||||
('Peter', 'Müller', 'Peter@123.de');
|
||||
25
src/main/resources/schema.sql
Normal file
25
src/main/resources/schema.sql
Normal file
@ -0,0 +1,25 @@
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
|
||||
DROP TABLE IF EXISTS teilnehmer;
|
||||
CREATE TABLE teilnehmer (
|
||||
teilnehmer_id INT PRIMARY KEY AUTO_INCREMENT,
|
||||
vorname VARCHAR(50) NOT NULL,
|
||||
nachname VARCHAR(50) NOT NULL ,
|
||||
email VARCHAR(255) NOT NULL
|
||||
);
|
||||
|
||||
DROP TABLE IF EXISTS gruppe;
|
||||
CREATE TABLE gruppe
|
||||
(
|
||||
gruppe_id INTEGER PRIMARY KEY auto_increment,
|
||||
titel TEXT NOT NULL,
|
||||
beschreibung TEXT NOT NULL
|
||||
);
|
||||
|
||||
DROP TABLE IF EXISTS teilnahme;
|
||||
CREATE TABLE teilnahme
|
||||
(
|
||||
id INTEGER PRIMARY KEY auto_increment,
|
||||
teilnehmer_dto INTEGER REFERENCES teilnehmer(teilnehmer_id),
|
||||
gruppe_dto INTEGER REFERENCES gruppe(gruppe_id)
|
||||
);
|
||||
Reference in New Issue
Block a user