Sha256: 5819397436e2680d7fa569545cf75ebc5182747ba910480c14f785bfab4a5e20

Contents?: true

Size: 719 Bytes

Versions: 13

Compression:

Stored size: 719 Bytes

Contents

# frozen_string_literal: true

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

13 entries across 13 versions & 1 rubygems

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