Sha256: 9769360cc6139e544678bd7fff9e1a2cd34da91acf8137199e5e8da201c74661

Contents?: true

Size: 404 Bytes

Versions: 2

Compression:

Stored size: 404 Bytes

Contents

class CreateCategories < ActiveRecord::Migration[6.0]
  def self.up
    create_table :rails_marketplace_categories do |t|
      t.string :name
      t.text :description
      t.string :image
      t.integer :parent_id, :null => true, :index => true
      t.integer :depth, :null => false, :default => 0
    end
  end

  def self.down
    drop_table :rails_marketplace_categories
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rails_marketplace-0.0.2 db/migrate/20161109191644_create_categories.rb
rails_marketplace-0.0.1 db/migrate/20161109191644_create_categories.rb