Sha256: 868ca38eb4749e837a7fb55dc9f11f13845a640ea3ea50a45991983b9ecde7d3

Contents?: true

Size: 688 Bytes

Versions: 8

Compression:

Stored size: 688 Bytes

Contents

class CreateTasks < ActiveRecord::Migration[4.2]
  def self.up
    create_table :tasks, force: true do |t|
      t.string :uuid, limit: 36
      t.references :user
      t.integer :assigned_to
      t.integer :completed_by
      t.string :name, null: false, default: ""
      t.references :asset, polymorphic: true
      t.string :priority, limit: 32
      t.string :category, limit: 32
      t.string :bucket, limit: 32
      t.datetime :due_at
      t.datetime :completed_at
      t.datetime :deleted_at
      t.timestamps
    end

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

  def self.down
    drop_table :tasks
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
fat_free_crm-0.15.2 db/migrate/20100928030612_create_tasks.rb
fat_free_crm-0.16.4 db/migrate/20100928030612_create_tasks.rb
fat_free_crm-0.15.1 db/migrate/20100928030612_create_tasks.rb
fat_free_crm-0.16.3 db/migrate/20100928030612_create_tasks.rb
fat_free_crm-0.16.2 db/migrate/20100928030612_create_tasks.rb
fat_free_crm-0.16.1 db/migrate/20100928030612_create_tasks.rb
fat_free_crm-0.16.0 db/migrate/20100928030612_create_tasks.rb
fat_free_crm-0.15.0 db/migrate/20100928030612_create_tasks.rb