Browse Source

move database files to match new layouts

pull/1079/merge
Justin Richer 8 years ago
parent
commit
8333d035b4
  1. 0
      openid-connect-server-webapp/src/main/resources/db/hsql/clients.sql
  2. 0
      openid-connect-server-webapp/src/main/resources/db/hsql/hsql_database_tables.sql
  3. 0
      openid-connect-server-webapp/src/main/resources/db/hsql/loading_temp_tables.sql
  4. 0
      openid-connect-server-webapp/src/main/resources/db/hsql/scopes.sql
  5. 0
      openid-connect-server-webapp/src/main/resources/db/hsql/security-schema.sql
  6. 0
      openid-connect-server-webapp/src/main/resources/db/hsql/users.sql
  7. 0
      openid-connect-server-webapp/src/main/resources/db/mysql/mysql_database_tables.sql
  8. 14
      openid-connect-server-webapp/src/main/resources/db/mysql/security-schema.sql
  9. 0
      openid-connect-server-webapp/src/main/resources/db/oracle/clients_oracle.sql
  10. 0
      openid-connect-server-webapp/src/main/resources/db/oracle/entity-mappings_oracle.xml
  11. 0
      openid-connect-server-webapp/src/main/resources/db/oracle/loading_temp_tables_oracle.sql
  12. 0
      openid-connect-server-webapp/src/main/resources/db/oracle/oracle_database_tables.sql
  13. 0
      openid-connect-server-webapp/src/main/resources/db/oracle/scopes_oracle.sql
  14. 0
      openid-connect-server-webapp/src/main/resources/db/oracle/security-schema_oracle.sql
  15. 0
      openid-connect-server-webapp/src/main/resources/db/oracle/users_oracle.sql
  16. 0
      openid-connect-server-webapp/src/main/resources/db/psql/psql_database_tables.sql
  17. 14
      openid-connect-server-webapp/src/main/resources/db/psql/security-schema.sql
  18. 36
      openid-connect-server-webapp/src/main/webapp/WEB-INF/data-context.xml
  19. 2
      openid-connect-server-webapp/src/main/webapp/WEB-INF/jpa-config.xml

0
openid-connect-server-webapp/src/main/resources/db/clients.sql → openid-connect-server-webapp/src/main/resources/db/hsql/clients.sql

0
openid-connect-server-webapp/src/main/resources/db/tables/hsql_database_tables.sql → openid-connect-server-webapp/src/main/resources/db/hsql/hsql_database_tables.sql

0
openid-connect-server-webapp/src/main/resources/db/tables/loading_temp_tables.sql → openid-connect-server-webapp/src/main/resources/db/hsql/loading_temp_tables.sql

0
openid-connect-server-webapp/src/main/resources/db/scopes.sql → openid-connect-server-webapp/src/main/resources/db/hsql/scopes.sql

0
openid-connect-server-webapp/src/main/resources/db/tables/security-schema.sql → openid-connect-server-webapp/src/main/resources/db/hsql/security-schema.sql

0
openid-connect-server-webapp/src/main/resources/db/users.sql → openid-connect-server-webapp/src/main/resources/db/hsql/users.sql

0
openid-connect-server-webapp/src/main/resources/db/tables/mysql_database_tables.sql → openid-connect-server-webapp/src/main/resources/db/mysql/mysql_database_tables.sql

14
openid-connect-server-webapp/src/main/resources/db/mysql/security-schema.sql

@ -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
openid-connect-server-webapp/src/main/resources/db/clients_oracle.sql → openid-connect-server-webapp/src/main/resources/db/oracle/clients_oracle.sql

0
openid-connect-server-webapp/src/main/resources/entity-mappings_oracle.xml → openid-connect-server-webapp/src/main/resources/db/oracle/entity-mappings_oracle.xml

0
openid-connect-server-webapp/src/main/resources/db/tables/loading_temp_tables_oracle.sql → openid-connect-server-webapp/src/main/resources/db/oracle/loading_temp_tables_oracle.sql

0
openid-connect-server-webapp/src/main/resources/db/tables/oracle_database_tables.sql → openid-connect-server-webapp/src/main/resources/db/oracle/oracle_database_tables.sql

0
openid-connect-server-webapp/src/main/resources/db/scopes_oracle.sql → openid-connect-server-webapp/src/main/resources/db/oracle/scopes_oracle.sql

0
openid-connect-server-webapp/src/main/resources/db/tables/security-schema_oracle.sql → openid-connect-server-webapp/src/main/resources/db/oracle/security-schema_oracle.sql

0
openid-connect-server-webapp/src/main/resources/db/users_oracle.sql → openid-connect-server-webapp/src/main/resources/db/oracle/users_oracle.sql

0
openid-connect-server-webapp/src/main/resources/db/tables/psql_database_tables.sql → openid-connect-server-webapp/src/main/resources/db/psql/psql_database_tables.sql

14
openid-connect-server-webapp/src/main/resources/db/psql/security-schema.sql

@ -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));

36
openid-connect-server-webapp/src/main/webapp/WEB-INF/data-context.xml

@ -32,14 +32,14 @@
<!-- Use the following to set up the OIC tables in the in-memory DB <!-- 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. --> If you are using a file based HSQLDB you should not run this every time. -->
<jdbc:initialize-database data-source="dataSource"> <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 --> <!-- 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 --> <!-- 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/hsql/loading_temp_tables.sql"/>
<jdbc:script location="classpath:/db/users.sql"/> <jdbc:script location="classpath:/db/hsql/users.sql"/>
<jdbc:script location="classpath:/db/clients.sql"/> <jdbc:script location="classpath:/db/hsql/clients.sql"/>
<jdbc:script location="classpath:/db/scopes.sql"/> <jdbc:script location="classpath:/db/hsql/scopes.sql"/>
</jdbc:initialize-database> </jdbc:initialize-database>
<bean id="jpaAdapter" class="org.springframework.orm.jpa.vendor.EclipseLinkJpaVendorAdapter"> <bean id="jpaAdapter" class="org.springframework.orm.jpa.vendor.EclipseLinkJpaVendorAdapter">
@ -48,7 +48,7 @@
</bean> </bean>
<!-- The following is for connecting to a MySQL database that has been initialized with <!-- 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"> <!--<bean id="dataSource" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
<property name="driverClassName" value="com.mysql.cj.jdbc.Driver" /> <property name="driverClassName" value="com.mysql.cj.jdbc.Driver" />
<property name="jdbcUrl" value="jdbc:mysql://localhost:3306/oic" /> <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/oic" />
@ -71,7 +71,7 @@
</bean> --> </bean> -->
<!-- The following is for connecting to a PostgreSQL database that has been initialized with <!-- 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"> <bean id="dataSource" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
<property name="driverClassName" value="org.postgresql.Driver" /> <property name="driverClassName" value="org.postgresql.Driver" />
@ -81,9 +81,9 @@
</bean> </bean>
<jdbc:initialize-database data-source="dataSource"> <jdbc:initialize-database data-source="dataSource">
<jdbc:script location="classpath:/db/tables/psql_database_tables.sql"/> <jdbc:script location="classpath:/db/psql/psql_database_tables.sql"/>
<jdbc:script location="classpath:/db/tables/security-schema.sql"/> <jdbc:script location="classpath:/db/psql/security-schema.sql"/>
<jdbc:script location="classpath:/db/tables/loading_temp_tables.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/users.sql"/>
<jdbc:script location="classpath:/db/psql/clients.sql"/> <jdbc:script location="classpath:/db/psql/clients.sql"/>
<jdbc:script location="classpath:/db/psql/scopes.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 <!-- 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"> <!--<bean id="dataSource" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
<property name="driverClassName" value="oracle.jdbc.driver.OracleDriver" /> <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver" />
<property name="jdbcUrl" value="jdbc:oracle:thin:@localhost:1521:XE" /> <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 <!-- Use the following to set up the OIC tables in the Oracle DB
Below scripts are intended to be run once at startup. --> Below scripts are intended to be run once at startup. -->
<!--<jdbc:initialize-database data-source="dataSource"> <!--<jdbc:initialize-database data-source="dataSource">
<jdbc:script location="classpath:/db/tables/oracle_database_tables.sql"/> <jdbc:script location="classpath:/db/oracle/oracle_database_tables.sql"/>
<jdbc:script location="classpath:/db/tables/security-schema_oracle.sql"/> <jdbc:script location="classpath:/db/oracle/security-schema_oracle.sql"/>
<jdbc:script location="classpath:/db/tables/loading_temp_tables_oracle.sql"/> <jdbc:script location="classpath:/db/oracle/loading_temp_tables_oracle.sql"/>
<jdbc:script location="classpath:/db/users_oracle.sql"/> <jdbc:script location="classpath:/db/oracle/users_oracle.sql"/>
<jdbc:script location="classpath:/db/clients_oracle.sql"/> <jdbc:script location="classpath:/db/oracle/clients_oracle.sql"/>
<jdbc:script location="classpath:/db/scopes_oracle.sql"/> <jdbc:script location="classpath:/db/oracle/scopes_oracle.sql"/>
</jdbc:initialize-database>--> </jdbc:initialize-database>-->
<!--<bean id="jpaAdapter" class="org.springframework.orm.jpa.vendor.EclipseLinkJpaVendorAdapter"> <!--<bean id="jpaAdapter" class="org.springframework.orm.jpa.vendor.EclipseLinkJpaVendorAdapter">

2
openid-connect-server-webapp/src/main/webapp/WEB-INF/jpa-config.xml

@ -49,7 +49,7 @@
</property> </property>
<property name="persistenceUnitName" value="defaultPersistenceUnit" /> <property name="persistenceUnitName" value="defaultPersistenceUnit" />
<!-- uncomment for Oracle --> <!-- uncomment for Oracle -->
<!--<property name="mappingResources" value="entity-mappings_oracle.xml" />--> <!--<property name="mappingResources" value="db/oracle/entity-mappings_oracle.xml" />-->
</bean> </bean>

Loading…
Cancel
Save