Question : create table if not exist rails
Answered by : strange-sandpiper-5rnxrv50mu05
create_table :repo_subscriptions, if_not_exists: true do |t| t.string :user_name t.string :repo_name t.timestamps
end
Source : https://dev.to/prathamesh/create-table-in-rails-only-if-it-does-not-exist-already-10mb | Last Update : Fri, 24 Apr 20