Dear All
how to create a table if not exists already?
how can i check that whether the table exists or not?
pls guide me on this
Dear All
how to create a table if not exists already?
how can i check that whether the table exists or not?
pls guide me on this
Hi
You will get table names for your environment with
ActiveRecord::Base.connection.tables
Sijo K George
Newb N. wrote:
Dear All
how to create a table if not exists already?
how can i check that whether the table exists or not?pls guide me on this
Generally speaking, you shouldn’t need to do this at all. In most
cases, the only time you should create tables is in migrations, and
Rails takes care of the logic in there.
Why do you think you need to check whether a table exists? What are you
trying to achieve?
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs