Sha256: 470ad4b2c576101cf1a3fe4d866f163d45d329993e7acb7b5695fba1a2d721bc

Contents?: true

Size: 355 Bytes

Versions: 5

Compression:

Stored size: 355 Bytes

Contents

class CreateCategories < ActiveRecord::Migration

  def change
    create_table(:market_categories) do |t|
      t.text :name, null: false
      t.integer :position, default: 0
      t.index :position
      t.references :category
      t.foreign_key :market_categories, column: :category_id
      t.index :category_id
      t.timestamps
    end
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
coalla-cms-0.4.2.0 lib/generators/coalla/cms/market/templates/migrations/create_categories.rb
coalla-cms-0.5.2.4 lib/generators/coalla/cms/market/templates/migrations/create_categories.rb
coalla-cms-0.4.4.3 lib/generators/coalla/cms/market/templates/migrations/create_categories.rb
coalla-cms-0.5.1.9 lib/generators/coalla/cms/market/templates/migrations/create_categories.rb
coalla-cms-0.5.1.8 lib/generators/coalla/cms/market/templates/migrations/create_categories.rb