Rails 6 adds if_not_exists option to create_table

23-May-2019 1663
This blog is part of our Rails 6 series. Rails 6.0.0.rc1 was recently released.Rails 6 added if_not_exists to create_table option to create a table if it doesn’t exist.Before Rails 6, we could use ActiveRecord::Base.connection.table_exists?.Default value of if_not_exists option is false.
Use coupon code:

RUBYONRAILS

to get 30% discount on our bundle!
Prepare for your next tech interview with our comprehensive collection of programming interview guides. Covering JavaScript, Ruby on Rails, React, and Python, these highly-rated books offer thousands of essential questions and answers to boost your interview success. Buy our 'Ultimate Job Interview Preparation eBook Bundle' featuring 2200+ questions across multiple languages. Ultimate Job Interview Preparation eBook Bundle