Sha256: ba908cbfd48aa59cb942c116fb3fed4228ff0a0154681926b03c8201afdee10c

Contents?: true

Size: 312 Bytes

Versions: 4

Compression:

Stored size: 312 Bytes

Contents

# frozen_string_literal: true

class CreateCategoriesTable < ActiveRecord::Migration[5.0]
  def change
    create_table :categories do |t|
      t.string :name, null: false

      t.references :article, foreign_key: true, index: true
      t.references :global,  foreign_key: true, index: true
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rating-0.11.0 spec/support/db/migrate/create_categories_table.rb
rating-0.10.0 spec/support/db/migrate/create_categories_table.rb
rating-0.9.0 spec/support/db/migrate/create_categories_table.rb
rating-0.8.0 spec/support/db/migrate/create_categories_table.rb