Skip to content

Instantly share code, notes, and snippets.

@ruescasd
Created April 22, 2014 00:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ruescasd/11161325 to your computer and use it in GitHub Desktop.
Save ruescasd/11161325 to your computer and use it in GitHub Desktop.
// dao class
class DAO(override val profile: JdbcProfile) extends DogComponent with CatComponent with Profile {
val Cats = TableQuery[CatsTable]
val Dogs = TableQuery[DogsTable]
import profile.simple._
val ddl = Cats.ddl++Dogs.ddl
}
# config setting
slick.default="models.current.dao.*"
# resulting sql, only has the last table
# --- Created by Slick DDL
# To stop Slick DDL generation, remove this comment and start using Evolutions
# --- !Ups
create table "DOG" ("name" VARCHAR(254) NOT NULL PRIMARY KEY,"color" VARCHAR(254) NOT NULL);
# --- !Downs
drop table "DOG";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment