Stephen Friedrich
unread,May 14, 2012, 5:25:07 PM5/14/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mybati...@googlegroups.com
My migrations include loading file data into MySQL tables using LOAD_FILE(filepath).
Unfortunately MySQL only supports absolute path specifications for filepath.
That means sharing migrations via git does not work :-(
I tried adding
data_dir=D:/absolute/path/to/migration_repo/data
to the environment.properties and then using LOAD_FILE(${data_dir}/some_file.png)
This is working fine, but actually only shifts the problem, because now everybody must edit the environment properties locally.
I propose to automatically add the migration repo base dir to the environment properties ("mybatis-migration-base-path"?)
From a quick glance at the code, that could be added to BaseCommand.environmentProperties():
props.put("mybatis-migration-base-path", basePath.getAbsolutePath() );
though MySQL needs forward slashes even on windows.
What do you think?
Or is there a already a way to make this work?