Sha256: e7af9ab471bbb2b6f3ddcd08589903765b062d2c463c39d26069e53c108b59c9

Contents?: true

Size: 307 Bytes

Versions: 5

Compression:

Stored size: 307 Bytes

Contents

class CreatePosts < ActiveRecord::Migration
  def self.up
    create_table :posts do |t|
      t.string :name
      t.text :body
      t.timestamps
    end
    add_index :posts, :name, length: 255, unique: true # explicit length is required for MySQL
  end
 
  def self.down
    drop_table :posts
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
fluentd-server-0.3.2 db/migrate/0001_create_posts.rb
fluentd-server-0.3.1 db/migrate/0001_create_posts.rb
fluentd-server-0.3.0 db/migrate/0001_create_posts.rb
fluentd-server-0.2.0 db/migrate/0001_create_posts.rb
fluentd-server-0.1.0 db/migrate/20140512203133_create_posts.rb