Sha256: 4e3c3e42e6e183da866f5f501ab61b474b64a7e71cf3eac15aeac9614e1d83e4

Contents?: true

Size: 777 Bytes

Versions: 9

Compression:

Stored size: 777 Bytes

Contents

class CreateTestTables < ActiveRecord::Migration

  def self.up

    create_table :forums do |t|
      t.string :name
      t.boolean :trashed
    end

    create_table :topics do |t|
      t.string :subject
      t.references :forum
      t.references :author
      t.boolean :trashed
    end

    create_table :posts do |t|
      t.text :body
      t.references :topic
      t.references :author
      t.boolean :trashed
      t.timestamps
    end

    create_table :users do |t|
      t.string :email
      t.boolean :trashed
    end

    create_table :profiles do |t|
      t.references :user
      t.text :hobbies
      t.boolean :trashed
    end

  end

  def self.down
    drop_table :forums
    drop_table :topics
    drop_table :posts
    drop_table :users
  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
edge_rider-0.3.1 spec/shared/app_root/db/migrate/001_create_test_tables.rb
edge_rider-0.3.0 spec/shared/app_root/db/migrate/001_create_test_tables.rb
edge_rider-0.2.5 spec/shared/app_root/db/migrate/001_create_test_tables.rb
edge_rider-0.2.4 spec/shared/app_root/db/migrate/001_create_test_tables.rb
edge_rider-0.2.3 spec/shared/app_root/db/migrate/001_create_test_tables.rb
edge_rider-0.2.2 spec/shared/app_root/db/migrate/001_create_test_tables.rb
edge_rider-0.2.1 spec/shared/app_root/db/migrate/001_create_test_tables.rb
edge_rider-0.2.0 spec/shared/app_root/db/migrate/001_create_test_tables.rb
edge_rider-0.1.1 spec/shared/app_root/db/migrate/001_create_test_tables.rb