Sha256: 94bfc28a6da091d45fb3855e6a919e66794823236c9e2dc4e29bd489f177be7b

Contents?: true

Size: 727 Bytes

Versions: 10

Compression:

Stored size: 727 Bytes

Contents

class InitialTables < ActiveRecord::Migration
  def self.up
    create_table :companies do |t|
      t.string :name
    end

    create_table :projects do |t|
      t.integer :company_id
      t.string :name
      t.date :due_date
    end

    create_table :tasks do |t|
      t.integer :project_id
      t.string :name
      t.date :start_date
      t.date :end_date
    end

    create_table :milestones do |t|
      t.integer :task_id
      t.string :name
    end

    create_table :project_tasks do |t|
      t.integer :project_id
      t.string :name
    end
  end

  def self.down
    drop_table :companies
    drop_table :projects
    drop_table :tasks
    drop_table :milestones
    drop_table :project_tasks
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
freeform-1.0.11 spec/dummy/db/migrate/20110710143903_initial_tables.rb
freeform-1.0.9 spec/dummy/db/migrate/20110710143903_initial_tables.rb
freeform-1.0.8 spec/dummy/db/migrate/20110710143903_initial_tables.rb
freeform-1.0.6 spec/dummy/db/migrate/20110710143903_initial_tables.rb
freeform-1.0.5 spec/dummy/db/migrate/20110710143903_initial_tables.rb
freeform-1.0.4 spec/dummy/db/migrate/20110710143903_initial_tables.rb
freeform-1.0.3 spec/dummy/db/migrate/20110710143903_initial_tables.rb
freeform-1.0.2 spec/dummy/db/migrate/20110710143903_initial_tables.rb
freeform-1.0.1 spec/dummy/db/migrate/20110710143903_initial_tables.rb
freeform-1.0.0 spec/dummy/db/migrate/20110710143903_initial_tables.rb