Here is what I use to create my database:
DataMapper.setup(:default,"sqlite://my.db")
class Model1
property :some_prop,String
...
property :other_prop,String
end
DataMapper.auto_upgrade!
I use this in combination with Sinatra. Everything is fine, while the script is running, I can use my objects in normal mode. However, I do not see the file my.dbon disk, and every time I restart the application, I start from scratch, without any objects.
What am I doing wrong?
source
share