I've written a custom database adapter that works correctly and effectively when a rails server is running. I would now like to add the usual rake task definitions for creating, dropping and migrating the database.
I would like to implement:
db:[drop|create|migrate]
How do I package these definitions with my gem so that they override the default ones for anyone who uses the gem?
I looked through the source of other adapters but all the rake task logic appears to be baked into active_record itself, each task just switches on the adapter name.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…