It’s impossible to get a database model right the first time. Often, you end up with a db with a half-finished, garbage schema. Hibernate makes this more tolerable, if you set the hibernate.hbm2ddl.auto
flag to create
it will just wipe the DB when your container restarts.
Until 2.0, Rails didn’t have something similar and I either had to manually drop/create the DB, or hope that rake db:migrate VERSION=0
did what I needed. Thankfully, Rails 2.0 offers the perfect set of rake tasks:rake db:create
and rake db:drop
. Just another way the Rails team alleviates some of the pain of web development.