You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nova
a960f43cb6
|
4 years ago | |
---|---|---|
app | 4 years ago | |
conf | 4 years ago | |
logs | 4 years ago | |
modules | 4 years ago | |
project | 4 years ago | |
public | 4 years ago | |
scripts | 4 years ago | |
test/controller | 4 years ago | |
.gitignore | 4 years ago | |
.scalafmt.conf | 4 years ago | |
README.md | 4 years ago | |
build.sbt | 4 years ago | |
test.trace.db | 4 years ago |
README.md
Play with Slick 3.3
This project shows Play working with Slick.
This project is configured to keep all the modules self-contained.
- Slick is isolated from Play, not using play-slick.
- Database migration is done using Flyway, not Play Evolutions.
- Slick's classes are auto-generated following database migration.
Database Migration
sbt flyway/flywayMigrate
Slick Code Generation
You will need to run the flywayMigrate task first, and then you will be able to generate tables using sbt-codegen.
sbt slickCodegen
Testing
You can run functional tests against an in memory database and Slick easily with Play from a clean slate:
sbt clean flyway/flywayMigrate slickCodegen compile test
Running
To run the project, start up Play:
sbt run
And that's it!
Now go to http://localhost:9000, and you will see the list of users in the database.