Added auto population of authorization roles

This commit is contained in:
neviyn 2021-04-30 00:49:47 +01:00
parent b47b534b6f
commit 4cf91146db
3 changed files with 5 additions and 4 deletions

View File

@ -1,4 +1,4 @@
spring.jpa.hibernate.ddl-auto=none spring.jpa.hibernate.ddl-auto=validate
spring.datasource.initialization-mode=always spring.datasource.initialization-mode=always
spring.jpa.properties.hibernate.default_schema=booru spring.jpa.properties.hibernate.default_schema=booru
images.types=jpg,png,gif images.types=jpg,png,gif

View File

@ -0,0 +1,2 @@
INSERT INTO booru.role (id, name) VALUES (1, 'ADMIN') ON CONFLICT DO NOTHING ;
INSERT INTO booru.role (id, name) VALUES (2, 'USER') ON CONFLICT DO NOTHING ;

View File

@ -1,6 +1,5 @@
spring.datasource.url=jdbc:h2:mem:testdb spring.datasource.url=jdbc:h2:mem:testdb;MODE=PostgreSQL;INIT=CREATE SCHEMA IF NOT EXISTS booru
spring.datasource.driverClassName=org.h2.Driver spring.datasource.driverClassName=org.h2.Driver
spring.flyway.enabled=false
spring.jpa.hibernate.ddl-auto=update spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.default_schema= spring.jpa.properties.hibernate.default_schema=booru
images.directory=./images images.directory=./images