How to Delete Table from Database?


#1

I want to delete my project, how do I delete my table inside my sqlite
database?

Thanks


#2

ActiveRecord::Base.connection.drop_table :your_table_name

Maurício Linhares
http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/
(en)

On Mon, Jun 1, 2009 at 6:41 PM, Zayd C.


#3

Or, if you created it with a migration, you can just undo it the same
way (the code is already written for you):

rake db:migrate:down VERSION=x

You can grab the version number from the front of your file name in db
\migrations

On Jun 1, 5:41 pm, Zayd C. removed_email_address@domain.invalid


#4

Brian wrote:

Or, if you created it with a migration, you can just undo it the same
way (the code is already written for you):

rake db:migrate:down VERSION=x

You can grab the version number from the front of your file name in db
\migrations

On Jun 1, 5:41�pm, Zayd C. removed_email_address@domain.invalid

Thanks guys for your help, got things squared away.

Kindest Regards