Sha256: 14bc08018acaf0bf2a13fc8747031a6dd5b867d23834aaa2af7ede3316fd9fbf

Contents?: true

Size: 519 Bytes

Versions: 2

Compression:

Stored size: 519 Bytes

Contents

class CreateGutsContents < ActiveRecord::Migration
  def change
    create_table :guts_contents do |t|
      t.string :title
      t.string :slug
      t.text :tags, null: true
      t.text :content, null: true
      t.integer :visible, default: 1, limit: 1

      t.timestamps null: false
    end
    
    add_index :guts_contents, :slug, unique: true
    add_reference :guts_contents, :type, index: true, foreign_key: true
    add_reference :guts_contents, :user, index: true, foreign_key: true, null: true
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
guts-1.0.5 db/migrate/6_create_guts_contents.rb
guts-1.0.3 db/migrate/20151124030755_create_guts_contents.rb