move database files to match new layouts
parent
fa122e7ad6
commit
8333d035b4
|
@ -0,0 +1,14 @@
|
|||
--
|
||||
-- Tables for Spring Security's user details service
|
||||
--
|
||||
|
||||
create table IF NOT EXISTS users(
|
||||
username varchar(50) not null primary key,
|
||||
password varchar(50) not null,
|
||||
enabled boolean not null);
|
||||
|
||||
create table IF NOT EXISTS authorities (
|
||||
username varchar(50) not null,
|
||||
authority varchar(50) not null,
|
||||
constraint fk_authorities_users foreign key(username) references users(username),
|
||||
constraint ix_authority unique (username,authority));
|
|
@ -0,0 +1,14 @@
|
|||
--
|
||||
-- Tables for Spring Security's user details service
|
||||
--
|
||||
|
||||
create table IF NOT EXISTS users(
|
||||
username varchar(50) not null primary key,
|
||||
password varchar(50) not null,
|
||||
enabled boolean not null);
|
||||
|
||||
create table IF NOT EXISTS authorities (
|
||||
username varchar(50) not null,
|
||||
authority varchar(50) not null,
|
||||
constraint fk_authorities_users foreign key(username) references users(username),
|
||||
constraint ix_authority unique (username,authority));
|
|
@ -32,14 +32,14 @@
|
|||
<!-- Use the following to set up the OIC tables in the in-memory DB
|
||||
If you are using a file based HSQLDB you should not run this every time. -->
|
||||
<jdbc:initialize-database data-source="dataSource">
|
||||
<jdbc:script location="classpath:/db/tables/hsql_database_tables.sql"/>
|
||||
<jdbc:script location="classpath:/db/hsql/hsql_database_tables.sql"/>
|
||||
<!-- The following file is for the jdbc-user-service spring security implementation -->
|
||||
<jdbc:script location="classpath:/db/tables/security-schema.sql"/>
|
||||
<jdbc:script location="classpath:/db/hsql/security-schema.sql"/>
|
||||
<!-- The following files are for safely bootstrapping users and clients into the database -->
|
||||
<jdbc:script location="classpath:/db/tables/loading_temp_tables.sql"/>
|
||||
<jdbc:script location="classpath:/db/users.sql"/>
|
||||
<jdbc:script location="classpath:/db/clients.sql"/>
|
||||
<jdbc:script location="classpath:/db/scopes.sql"/>
|
||||
<jdbc:script location="classpath:/db/hsql/loading_temp_tables.sql"/>
|
||||
<jdbc:script location="classpath:/db/hsql/users.sql"/>
|
||||
<jdbc:script location="classpath:/db/hsql/clients.sql"/>
|
||||
<jdbc:script location="classpath:/db/hsql/scopes.sql"/>
|
||||
</jdbc:initialize-database>
|
||||
|
||||
<bean id="jpaAdapter" class="org.springframework.orm.jpa.vendor.EclipseLinkJpaVendorAdapter">
|
||||
|
@ -48,7 +48,7 @@
|
|||
</bean>
|
||||
|
||||
<!-- The following is for connecting to a MySQL database that has been initialized with
|
||||
src/main/resources/db/tables/mysql_database_tables.sql -->
|
||||
src/main/resources/db/mysql/mysql_database_tables.sql -->
|
||||
<!--<bean id="dataSource" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
|
||||
<property name="driverClassName" value="com.mysql.cj.jdbc.Driver" />
|
||||
<property name="jdbcUrl" value="jdbc:mysql://localhost:3306/oic" />
|
||||
|
@ -71,7 +71,7 @@
|
|||
</bean> -->
|
||||
|
||||
<!-- The following is for connecting to a PostgreSQL database that has been initialized with
|
||||
src/main/resources/db/tables/psql_database_tables.sql -->
|
||||
src/main/resources/db/psql/psql_database_tables.sql -->
|
||||
<!--
|
||||
<bean id="dataSource" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
|
||||
<property name="driverClassName" value="org.postgresql.Driver" />
|
||||
|
@ -81,9 +81,9 @@
|
|||
</bean>
|
||||
|
||||
<jdbc:initialize-database data-source="dataSource">
|
||||
<jdbc:script location="classpath:/db/tables/psql_database_tables.sql"/>
|
||||
<jdbc:script location="classpath:/db/tables/security-schema.sql"/>
|
||||
<jdbc:script location="classpath:/db/tables/loading_temp_tables.sql"/>
|
||||
<jdbc:script location="classpath:/db/psql/psql_database_tables.sql"/>
|
||||
<jdbc:script location="classpath:/db/psql/security-schema.sql"/>
|
||||
<jdbc:script location="classpath:/db/psql/loading_temp_tables.sql"/>
|
||||
<jdbc:script location="classpath:/db/psql/users.sql"/>
|
||||
<jdbc:script location="classpath:/db/psql/clients.sql"/>
|
||||
<jdbc:script location="classpath:/db/psql/scopes.sql"/>
|
||||
|
@ -96,7 +96,7 @@
|
|||
-->
|
||||
|
||||
<!-- The following is for connecting to a Oracle database that has been initialized with
|
||||
src/main/resources/db/tables/oracle_database_tables.sql -->
|
||||
src/main/resources/db/oracle/oracle_database_tables.sql -->
|
||||
<!--<bean id="dataSource" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
|
||||
<property name="driverClassName" value="oracle.jdbc.driver.OracleDriver" />
|
||||
<property name="jdbcUrl" value="jdbc:oracle:thin:@localhost:1521:XE" />
|
||||
|
@ -107,12 +107,12 @@
|
|||
<!-- Use the following to set up the OIC tables in the Oracle DB
|
||||
Below scripts are intended to be run once at startup. -->
|
||||
<!--<jdbc:initialize-database data-source="dataSource">
|
||||
<jdbc:script location="classpath:/db/tables/oracle_database_tables.sql"/>
|
||||
<jdbc:script location="classpath:/db/tables/security-schema_oracle.sql"/>
|
||||
<jdbc:script location="classpath:/db/tables/loading_temp_tables_oracle.sql"/>
|
||||
<jdbc:script location="classpath:/db/users_oracle.sql"/>
|
||||
<jdbc:script location="classpath:/db/clients_oracle.sql"/>
|
||||
<jdbc:script location="classpath:/db/scopes_oracle.sql"/>
|
||||
<jdbc:script location="classpath:/db/oracle/oracle_database_tables.sql"/>
|
||||
<jdbc:script location="classpath:/db/oracle/security-schema_oracle.sql"/>
|
||||
<jdbc:script location="classpath:/db/oracle/loading_temp_tables_oracle.sql"/>
|
||||
<jdbc:script location="classpath:/db/oracle/users_oracle.sql"/>
|
||||
<jdbc:script location="classpath:/db/oracle/clients_oracle.sql"/>
|
||||
<jdbc:script location="classpath:/db/oracle/scopes_oracle.sql"/>
|
||||
</jdbc:initialize-database>-->
|
||||
|
||||
<!--<bean id="jpaAdapter" class="org.springframework.orm.jpa.vendor.EclipseLinkJpaVendorAdapter">
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
</property>
|
||||
<property name="persistenceUnitName" value="defaultPersistenceUnit" />
|
||||
<!-- uncomment for Oracle -->
|
||||
<!--<property name="mappingResources" value="entity-mappings_oracle.xml" />-->
|
||||
<!--<property name="mappingResources" value="db/oracle/entity-mappings_oracle.xml" />-->
|
||||
</bean>
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue