-
-
Notifications
You must be signed in to change notification settings - Fork 69
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
Fix hardcoded references to conf directory #1
Comments
@benmccann @schmitch hey guys, I want to fix this problem but I'm not understanding how to get application I was thinking to use |
I haven't used Play in years. I'm afraid my memory from 2014 is rather fuzzy |
@felipebonezi Look at this code from Play: val evolution = {
// First try a file on the filesystem
val filename = Evolutions.fileName(db, paddedRevision)
environment.getExistingFile(filename).map(_.toURI)
}.orElse {
// If file was not found, try a resource on the classpath
val resourceName = Evolutions.resourceName(db, paddedRevision)
environment.resource(resourceName).map(url => url.toURI)
}
/**
* Default evolutions directory location.
*/
def directoryName(db: String): String = s"conf/evolutions/${db}"
/**
* Default evolution file location.
*/
def fileName(db: String, revision: Int): String = s"${directoryName(db)}/${revision}.sql"
def fileName(db: String, revision: String): String = s"${directoryName(db)}/${revision}.sql" however if that files does not exist if falls back to I think that is the only way to solve this problem here. There is no helper method which gives you the conf folder. That's because in Play you can disable the |
Also, because (depending if |
EbeanDynamicEvolutions has hardcoded references to the conf directory:
The text was updated successfully, but these errors were encountered: