Sha256: f7bb16a2d34c57b25dedc28d160873f3a08a911908ac4b32a8bea852ee9cc08d

Contents?: true

Size: 943 Bytes

Versions: 7

Compression:

Stored size: 943 Bytes

Contents

class CreateUsers < ActiveRecord::Migration[6.0]
  def change
    create_table :users do |t|
      t.string :login, limit: 65, null: false
      t.string :email, limit: 50, null: false
      t.string :name, limit: 100, null: false
      t.string :surname, limit: 100, null: false
      t.string :timezone, limit: 30, null: false
      t.string :locale, limit: 10, null: false, default: 'ru-RU'
      t.integer :timeout, null: false, default: 3600
      t.string :phone, limit: 30
      t.string :password_digest, limit: 60, null: false
      t.string :auth_key, limit: 32
      t.string :recover_key, limit: 32
      t.integer :status, null: false, default: 0
      t.references :tenant, index: true, foreign_key: true
      t.binary :uuid_bin, limit: 16

      t.timestamps
    end
    add_index :users, [:login], unique: true
    add_index :users, [:email, :tenant_id], unique: true
    add_index :users, [:uuid_bin], unique: true
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
anoubis-1.0.12 db/migrate/20181018112151_create_users.rb
anoubis-1.0.11 db/migrate/20181018112151_create_users.rb
anoubis-1.0.10 db/migrate/20181018112151_create_users.rb
anoubis-1.0.8 db/migrate/20181018112151_create_users.rb
anoubis-1.0.7 db/migrate/20181018112151_create_users.rb
anoubis-1.0.1 db/migrate/20181018112151_create_users.rb
anoubis-1.0.0 db/migrate/20181018112151_create_users.rb