Forum: Ruby on Rails How to Delete Table from Database?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Musdev M. (Guest)
on 2009-06-02 01:41
I want to delete my project, how do I delete my table inside my sqlite
database?

Thanks
Maurício L. (Guest)
on 2009-06-02 01:43
(Received via mailing list)
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.
Brian (Guest)
on 2009-06-02 04:14
(Received via mailing list)
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>
Musdev M. (Guest)
on 2009-06-07 09:14
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
This topic is locked and can not be replied to.