adds migrations
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
class AddSmsVerificationCodeToUsers < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :users, :sms_verification_code, :string
|
||||
add_column :users, :sms_verified_at, :datetime
|
||||
end
|
||||
end
|
||||
5
db/migrate/20150819203410_add_phone_to_users.rb
Normal file
5
db/migrate/20150819203410_add_phone_to_users.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class AddPhoneToUsers < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :users, :phone, :string
|
||||
end
|
||||
end
|
||||
14
db/migrate/20150822095305_create_verified_users.rb
Normal file
14
db/migrate/20150822095305_create_verified_users.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
class CreateVerifiedUsers < ActiveRecord::Migration
|
||||
def change
|
||||
unless ActiveRecord::Base.connection.table_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
|
||||
6
db/migrate/20150822100557_add_document_to_users.rb
Normal file
6
db/migrate/20150822100557_add_document_to_users.rb
Normal file
@@ -0,0 +1,6 @@
|
||||
class AddDocumentToUsers < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :users, :document_number, :string
|
||||
add_column :users, :document_type, :string
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddResidenceVerifiedAtToUsers < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :users, :residence_verified_at, :datetime
|
||||
end
|
||||
end
|
||||
6
db/migrate/20150823111403_add_letter_to_users.rb
Normal file
6
db/migrate/20150823111403_add_letter_to_users.rb
Normal file
@@ -0,0 +1,6 @@
|
||||
class AddLetterToUsers < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :users, :letter_requested, :boolean, default: false
|
||||
add_column :users, :letter_sent_at, :datetime
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddEmailVerifiedAtToUsers < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :users, :email_verified_at, :datetime
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,6 @@
|
||||
class AddEmailVerificationToUsers < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :users, :email_verification_token, :string
|
||||
add_column :users, :email_for_verification, :string
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddVerifiedUserSmsVerifiedAtToUsers < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :users, :verified_user_sms_verified_at, :datetime
|
||||
end
|
||||
end
|
||||
5
db/migrate/20150825165517_add_sms_tried_to_users.rb
Normal file
5
db/migrate/20150825165517_add_sms_tried_to_users.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class AddSmsTriedToUsers < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :users, :sms_tries, :integer, default: 0
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddResidenceVerificationTriesToUsers < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :users, :residence_verification_tries, :integer, default: 0
|
||||
end
|
||||
end
|
||||
23
db/migrate/20150825201922_create_addresses.rb
Normal file
23
db/migrate/20150825201922_create_addresses.rb
Normal file
@@ -0,0 +1,23 @@
|
||||
class CreateAddresses < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :addresses do |t|
|
||||
t.integer :user_id
|
||||
t.string :street
|
||||
t.string :street_type
|
||||
t.string :number
|
||||
t.string :number_type
|
||||
t.string :letter
|
||||
t.string :portal
|
||||
t.string :stairway
|
||||
t.string :floor
|
||||
t.string :door
|
||||
t.string :km
|
||||
t.string :neighbourhood
|
||||
t.string :district
|
||||
t.string :postal_code
|
||||
t.string :toponymy
|
||||
|
||||
t.timestamps null: false
|
||||
end
|
||||
end
|
||||
end
|
||||
20
db/migrate/20150826182010_refactor_verification_columns.rb
Normal file
20
db/migrate/20150826182010_refactor_verification_columns.rb
Normal file
@@ -0,0 +1,20 @@
|
||||
class RefactorVerificationColumns < ActiveRecord::Migration
|
||||
def change
|
||||
rename_column :users, :sms_verification_code, :sms_confirmation_code
|
||||
|
||||
remove_column :users, :sms_verified_at
|
||||
remove_column :users, :email_verified_at
|
||||
remove_column :users, :email_for_verification
|
||||
remove_column :users, :verified_user_sms_verified_at
|
||||
add_column :users, :verified_at, :datetime
|
||||
|
||||
remove_column :users, :phone
|
||||
add_column :users, :unconfirmed_phone, :string
|
||||
add_column :users, :confirmed_phone, :string
|
||||
|
||||
remove_column :users, :letter_requested
|
||||
add_column :users, :letter_requested_at, :datetime
|
||||
|
||||
rename_column :users, :sms_tries, :sms_confirmation_tries
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user