Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Created a separate SQL file to create tables for the unmigrated entities #182

Merged
merged 3 commits into from
Jun 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -335,10 +335,13 @@ repository, update its location in your local properties:
If you have a previous build deployed already, you can replace the
deployment in the UI or add the `--force` switch after `deploy`.

1. Create database schema and initial data. Use the seed data to create tables:
1. Create database schema and initial data. Use the `seed.sql` data to create tables
and `legacy_seed.sql` to create tables for entities that have not yet
been migrated to Hibernate5:

```ShellSession
$ psql -h localhost -U psm psm < {/path/to/psm}/psm-app/db/seed.sql
$ psql -h localhost -U psm psm < {/path/to/psm}/psm-app/db/legacy_seed.sql
```

1. To check that the app is running, navigate to
Expand All @@ -347,4 +350,4 @@ repository, update its location in your local properties:
1. Login with one of the test users: Username `system` with password
`system` is a "system administrator" account that can create new
accounts. Username `admin` with password `admin` is a "service
admin" account that can create new provider enrollments.
admin" account that can create new provider enrollments.
15 changes: 15 additions & 0 deletions psm-app/db/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Database Setup Files
This directory contains some DDL files to create the database and populate some
initial test data.

## Seed.sql
This file sets up the database, inserts static data, and create some
default users to get you going

## Legacy_seed.sql
We are in the process of migrating all of the entities from Hibernate 4 to Hibernate 5,
however during the migration we need some of the unmigrated tables configured to perform
basic integration tests. This file creates the tables needed for the application to
run. As entities are migrated to Hibernate 5, the DDL for them should be removed from
here as new tables are created in seed.sql

Loading