From 901186f0b6cb677f0d4f93cb4ac97099c051d8db Mon Sep 17 00:00:00 2001 From: Yusuke Ebihara Date: Sun, 25 Sep 2016 19:44:36 +0900 Subject: [PATCH 1/2] Remove not null constraint from email in users. --- lib/generators/sorcery/templates/migration/core.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/generators/sorcery/templates/migration/core.rb b/lib/generators/sorcery/templates/migration/core.rb index af5f721c..fca611dc 100644 --- a/lib/generators/sorcery/templates/migration/core.rb +++ b/lib/generators/sorcery/templates/migration/core.rb @@ -1,7 +1,7 @@ class SorceryCore < <%= migration_class_name %> def change create_table :<%= model_class_name.tableize %> do |t| - t.string :email, :null => false + t.string :email t.string :crypted_password t.string :salt From 21e9bf7cbd04d686a32dba073a7dca05bf17c9c4 Mon Sep 17 00:00:00 2001 From: Yusuke Ebihara Date: Sun, 25 Sep 2016 19:46:21 +0900 Subject: [PATCH 2/2] Add username to users in a migration template file. --- lib/generators/sorcery/templates/migration/core.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/generators/sorcery/templates/migration/core.rb b/lib/generators/sorcery/templates/migration/core.rb index fca611dc..0c701d5c 100644 --- a/lib/generators/sorcery/templates/migration/core.rb +++ b/lib/generators/sorcery/templates/migration/core.rb @@ -2,6 +2,7 @@ class SorceryCore < <%= migration_class_name %> def change create_table :<%= model_class_name.tableize %> do |t| t.string :email + t.string :username t.string :crypted_password t.string :salt