20 lines
621 B
Ruby
20 lines
621 B
Ruby
class SorceryInit < ActiveRecord::Migration
|
|
def change
|
|
change_column :people, :email, :string, null: false
|
|
add_index :people, :email, unique: true
|
|
add_column :people, :activation_state, :string, default: nil
|
|
add_column :people, :activation_token, :string, default: nil
|
|
add_column :people, :activation_token_expires_at, :datetime, default: nil
|
|
|
|
add_index :people, :activation_token
|
|
|
|
create_table :authentications do |t|
|
|
t.integer :person_id, null: false
|
|
t.string :provider, :uid, null: false
|
|
|
|
t.timestamps
|
|
end
|
|
add_index :authentications, [:provider, :uid]
|
|
end
|
|
end
|