Sha256: 390515eff1927557549b62ede964db4439fc8019955da8ed09c016fae8ad1e38

Contents?: true

Size: 397 Bytes

Versions: 3

Compression:

Stored size: 397 Bytes

Contents

class CreateTbCommerceCategories < ActiveRecord::Migration
  def change
    create_table :tb_commerce_categories do |t|
      t.string :title, :null => false
      t.string :slug, :null => false
      t.index :slug, :unique => true
      t.timestamps null: false
    end
    add_reference :tb_commerce_products, :tb_commerce_category, :null => true, :index => true, :foreign_key => true
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tb_commerce-0.0.4 db/migrate/20150409192945_create_tb_commerce_categories.rb
tb_commerce-0.0.3 db/migrate/20150409192945_create_tb_commerce_categories.rb
tb_commerce-0.0.2 db/migrate/20150409192945_create_tb_commerce_categories.rb