DEPRECATION WARNING: #table_exists? currently checks both tables and views. This behavior is deprecated and will be changed with Rails 5.1 to only check tables. Use #data_source_exists? instead.
15 lines
362 B
Ruby
15 lines
362 B
Ruby
class CreateVerifiedUsers < ActiveRecord::Migration
|
|
def change
|
|
unless ActiveRecord::Base.connection.data_source_exists?("verified_users")
|
|
create_table :verified_users do |t|
|
|
t.string :document_number
|
|
t.string :document_type
|
|
t.string :phone
|
|
t.string :email
|
|
|
|
t.timestamps null: false
|
|
end
|
|
end
|
|
end
|
|
end
|