Sha256: 4353e1f6c2c0fecf0c8d40de13586b03b8e7c35d38724fa72ad4eb84cac36006

Contents?: true

Size: 648 Bytes

Versions: 2

Compression:

Stored size: 648 Bytes

Contents

class CreateFixtures < ActiveRecord::Migration
  def self.up
    [ :articles, :article_archives ].each do |table|
      create_table table do |t|
        t.string :title
        t.string :body
        t.boolean :read
        t.datetime :moved_at
      end
    end
    
    [ :comments, :comment_archives ].each do |table|
      create_table table do |t|
        t.string :title
        t.string :body
        t.boolean :read
        t.integer :article_id
        t.datetime :moved_at
      end
    end
  end

  def self.down
    [ :articles, :article_archives, :comments, :comment_archives ].each do |table|
      drop_table table
    end
  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
mover_postgres-0.3.6 spec/db/migrate/001_create_fixtures.rb
mover-0.3.6 spec/db/migrate/001_create_fixtures.rb