forked from playframework/play-slick
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Made SlickDDLPlugin much simpler and more robust.
Warning: This is a source incompatible change. Improvements: * more flexible and robust because it communicates with the user app via the play.api.db.slick.AutoDDL singleton object instead of automagical table object discovery * safer: scalac checks imports and objects referenced in play.api.db.slick.AutoDDL (unlike the existence of a package mentioned in config like it was before) * less reflection: now only happens in def fetchAutoDDLobject and just a bit * does not override user written evolution scripts, but shows error message instead
- Loading branch information
Showing
7 changed files
with
88 additions
and
185 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package play.api.db.slick | ||
object AutoDDL extends AutoDDLInterface{ | ||
import models._ | ||
def tables = Map( | ||
"default" -> Seq(Companies,Computers) | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package play.api.db.slick | ||
object AutoDDL extends AutoDDLInterface{ | ||
import models.current.dao._ | ||
|
||
def tables = Map( | ||
"default" -> Seq(Cats) | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package play.api.db.slick | ||
object AutoDDL extends AutoDDLInterface{ | ||
import models._ | ||
def tables = Map( | ||
"default" -> Seq(Cats) | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters