Sha256: cc204dccc5e0391b17e2108c74745affbdb17fdd0f372db76890f623ae293acb

Contents?: true

Size: 716 Bytes

Versions: 3

Compression:

Stored size: 716 Bytes

Contents

# frozen_string_literal: true

class ShieldifyCreateUsers < ActiveRecord::Migration<%= migration_version %>
  def change
    create_table :users do |t|
      ## Email registerable
      t.string :email, default: ""
      t.string :password_digest, default: ""

      ## Email confirmable
      t.string :unconfirmed_email
      t.string :email_confirmation_token
      t.string :email_confirmation_token_generated_at

      t.timestamps null: false
    end

    create_table :jwt_sessions do |t|
      t.string :jti, null: false
      t.references :user, null: false, foreign_key: true

      t.timestamps
    end

    add_index :users, :email, unique: true
    add_index :jwt_sessions, :jti, unique: true
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
shieldify-0.1.2.pre.alpha lib/generators/shieldify/templates/migration.rb.tt
shieldify-0.1.1.pre.alpha lib/generators/shieldify/templates/migration.rb.tt
shieldify-0.1.0.pre.alpha lib/generators/shieldify/templates/migration.rb.tt