Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Ubuntu User (http://www.linux-archive.org/ubuntu-user/)
-   -   What should rake db:test:clone do? (http://www.linux-archive.org/ubuntu-user/431553-what-should-rake-db-test-clone-do.html)

Colin Law 09-25-2010 01:14 PM

What should rake db:test:clone do?
 
On Rails 2.3.8 I expected rake db:test:clone to make a complete copy
of the development db as the test db. Having tried it, however, it
seems only to copy the structure.

What I am actually trying to achieve is to make an sqlite copy of the
mysql development db as I am moving to a different development machine
and want to use sqlite for development rather than mysql, so I need an
sqlite version of the existing development db. I changed database.yml
so that the test section reads:

test:
adapter: sqlite3
database: db/test.sqlite3
pool: 5
timeout: 5000

and checked that the tests run, which they do.

I then thought that an easy way to get an sqlite version of the
development db was to use rake db:test:create and simply rename
test.sqlite3 as development.sqlite3 ready for use. As I said above,
however, the rake command appears to have constructed an empty test
db. The development section of database.yml is still referencing the
mysql database of course.

Can anyone offer any suggestions?

Colin

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users


All times are GMT. The time now is 07:32 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.