Sha256: fb99fc048e4f639296cd18766c2944381f09bddef6dcd84e9d6bc56b9772d918

Contents?: true

Size: 795 Bytes

Versions: 13

Compression:

Stored size: 795 Bytes

Contents

# frozen_string_literal: true

class CreateAccounts < ActiveRecord::Migration[4.2]
  def self.up
    create_table :accounts, force: true do |t|
      t.string :uuid, limit: 36
      t.references :user
      t.integer :assigned_to
      t.string :name, limit: 64, null: false, default: ""
      t.string :access, limit: 8, default: "Public" # %w(Private Public Shared)
      t.string :website, limit: 64
      t.string :tall_free_phone, limit: 32
      t.string :phone, limit: 32
      t.string :fax, limit: 32
      t.string :billing_address
      t.string :shipping_address
      t.datetime :deleted_at
      t.timestamps
    end

    add_index :accounts, %i[user_id name deleted_at], unique: true
    add_index :accounts, :assigned_to
  end

  def self.down
    drop_table :accounts
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
fat_free_crm-0.22.1 db/migrate/20100928030601_create_accounts.rb
fat_free_crm-0.22.0 db/migrate/20100928030601_create_accounts.rb
fat_free_crm-0.21.0 db/migrate/20100928030601_create_accounts.rb
fat_free_crm-0.20.1 db/migrate/20100928030601_create_accounts.rb
fat_free_crm-0.20.0 db/migrate/20100928030601_create_accounts.rb
fat_free_crm-0.19.2 db/migrate/20100928030601_create_accounts.rb
fat_free_crm-0.19.0 db/migrate/20100928030601_create_accounts.rb
fat_free_crm-0.18.2 db/migrate/20100928030601_create_accounts.rb
fat_free_crm-0.17.3 db/migrate/20100928030601_create_accounts.rb
fat_free_crm-0.18.1 db/migrate/20100928030601_create_accounts.rb
fat_free_crm-0.18.0 db/migrate/20100928030601_create_accounts.rb
fat_free_crm-0.17.2 db/migrate/20100928030601_create_accounts.rb
fat_free_crm-0.17.1 db/migrate/20100928030601_create_accounts.rb