Sha256: 54e6f6f84fb961c87587d0f7a9e111739593efff2c53ddb7b04e8a1b9d57e774
Contents?: true
Size: 900 Bytes
Versions: 13
Compression:
Stored size: 900 Bytes
Contents
# frozen_string_literal: true class CreateOpportunities < ActiveRecord::Migration[4.2] def self.up create_table :opportunities, force: true do |t| t.string :uuid, limit: 36 t.references :user t.references :campaign 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 :source, limit: 32 t.string :stage, limit: 32 t.integer :probability t.decimal :amount, precision: 12, scale: 2 t.decimal :discount, precision: 12, scale: 2 t.date :closes_on t.datetime :deleted_at t.timestamps end add_index :opportunities, %i[user_id name deleted_at], unique: true, name: 'id_name_deleted' add_index :opportunities, :assigned_to end def self.down drop_table :opportunities end end
Version data entries
13 entries across 13 versions & 1 rubygems