I’ve been playing with a new Sinatra app. While I am building it out, I am getting back to basics. I’m only adding what I need as I need it. I really have no preconceptions of what I am building. It’s a journaling app, and I am just starting with a big ‘ol textarea.
While putting things together, I had some crappy data I wanted to clear out, but didn’t want to write some method to reset the database or setup environments yet. Turns out it’s pretty simple with Sequel.
With a sqlite database called
journal and a table called
entries, in a terminal, I just run
This drops me into an irb session with
DB setup as my database.
Sequel implements a
Now I have my clean database.