Maybe it can be possible using "schemas" namespace, but the simple way
is each project with your own DB like is with SQLite. But to do this,
there is need to connect with "super user" before the creation of new
databases on the fly.
> For #2, the ClueMapper code uses sqlalchemy for it's logic which means
> switching to any sqlalchemy-supported db should just be a matter of
> configuration. But this configuration has not yet been set up.
I found some places where cluemapper.db are hardcoded in ClueMapper
(trunk) package (ClueBin and ClueTimer alredy use sqlalchemy).
$ grep -rn cluemapper.db *
src/ClueMapper/src/clue/app/controller.py:167: shared_db =
pb(os.path.join('etc', 'cluemapper', 'cluemapper.db'))
src/ClueMapper/src/clue/app/project.py:383:
pb(os.path.join('etc', 'cluemapper', 'cluemapper.db'))
src/ClueMapper/src/clue/app/project.py:399: dbpath =
pb(os.path.join('etc', 'cluemapper', 'cluemapper.db'))
src/ClueMapper/src/clue/app/admin.py:385:
os.path.join(workingdir, 'etc', 'cluemapper', 'cluemapper.db')
src/ClueMapper/src/clue/app/tracplugins/user.py:14:
'sqlite:etc/cluemapper/cluemapper.db',
src/ClueMapper/src/clue/app/__init__.py:131: shared_db =
pb(os.path.join('etc', 'cluemapper', 'cluemapper.db'))
One simple solution is use a global function to find database
connection based on cluemaper.ini configuration option, and change
ClueMapper, ClueBin and ClueTimer to use it.
ClueBin and ClueTimer both has some duplicade code to deal with engine
/ session creation and cache.
I guess this should be will in one place (ClueMapper) ?
> Bottom line, patches are welcome although at some point this support will be
> added anyways (as soon as I need it).
Ok. Since we agree what need to be done and how it must be done, I can
write some patches and test code too. ;-)
Cheers,
ClueBin and ClueTimer both has some duplicade code to deal with engine
/ session creation and cache.
I guess this should be will in one place (ClueMapper) ?