lib/gemika/database.rb
##
# Drops all tables,  then
# runs the [ActiveRecord database migration](http://api.rubyonrails.org/classes/ActiveRecord/Migration.html) described in `block`.
#
# @example
#   Gemika::Database.new.rewrite_schema! do
#     create_table :users do |t|
#       t.string :name
#       t.string :email
#       t.string :city
#     end
#  end
Drops all tables,  then
runs the [ActiveRecord database migration] described in `block`.
Drops all tables then runs the [ ActiveRecord database migration ] described in ` block ` .
def rewrite_schema!(&block)
      connect
      drop_tables!
      migrate(&block)
    end
def rewrite_schema! ( & block ) connect drop_tables! migrate ( & block ) end
Drops all tables,  then
runs the [ActiveRecord database migration](http://api.rubyonrails.org/classes/ActiveRecord/Migration.html) described in `block`.
Drops all tables then runs the [ ActiveRecord database migration ] ( http : // api . rubyonrails . org / classes / ActiveRecord / Migration . html ) described in ` block ` .
block
example
:Database.new.rewrite_schema. do create_table :users do |t| t.string :name t.string :email t.string :city end end
: Database . new . rewrite_schema . do create_table : users do |t| t . string : name t . string : email t . string : city end end