sqlite database

Subscribe to sqlite database 2 post(s), 2 voice(s)

 
Avatar sidrah 2 post(s)

hello,
this feels like a really silly question, but i am having trouble finding the sqlite ‘database’ file in the source/download zip files. i had originally created sql database but now want to practice with the graphs with your data.

you write in your book on pg. 155 the following which i dont understand. i see a development.sqlite file in your /db folder. is that the database file? how do i import this / replace it with sql database. this is the paragraph i am talking about:

“I’ve created a sample SQLite 3 database preloaded with data that we’ll be using in this chapter that you can obtain from the Source Code/Download link on the Apress web site. Just copy this database in your /db directory over your existing development database, and your application will be loaded with enough data for our needs.”

 
Avatar EldonAlameda Administrator 216 post(s)

Sorry about the delay – I’m doing contract work for the National Weather Service and that outbreak of tornadoes in Missouri last night caused me a bit of extra work.

I’ll need to double-check this as it’s been quite a while since I’ve dug into that project – but you are correct that the development.sqlite database in the /db folder is the one that you would want.

What you should do is copy that file into you own /db directory.

Now you said that you had created a sql database and by that I’m assuming that you’re meaning MySQL. If that’s the case then you should also open the sample applications/config/database.yml and copy the settings for the development database into your projects database.yml (you can just comment out your existing development settings – don’t have to delete them)

Once you do that – then the next time you start the app in development mode you should be using the provided database file.

Let me know if you have any more questions