Sha256: c6f2cd60d515a4c03afec41963b17df37dba21bbfc74198eb88b8b11f19d075d
Contents?: true
Size: 650 Bytes
Versions: 8
Compression:
Stored size: 650 Bytes
Contents
<% if activerecord_adapter == "postgresql" -%> enable_extension "citext" <% end -%> create_table :accounts<%= primary_key_type %> do |t| <% case activerecord_adapter -%> <% when "postgresql" -%> t.citext :email, null: false, index: { unique: true, where: "status IN ('verified', 'unverified')" } <% else -%> t.string :email, null: false, index: { unique: true } <% end -%> t.string :status, null: false, default: "verified" end # Used if storing password hashes in a separate table (default) create_table :account_password_hashes<%= primary_key_type %> do |t| t.foreign_key :accounts, column: :id t.string :password_hash, null: false end
Version data entries
8 entries across 8 versions & 1 rubygems