Sha256: ce0de5030d7a607c1e478076b5032b121aedac25ac68fe49abbec4b5df4f7171

Contents?: true

Size: 252 Bytes

Versions: 3

Compression:

Stored size: 252 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
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rating-0.7.0 spec/support/db/migrate/create_categories_table.rb
rating-0.6.0 spec/support/db/migrate/create_categories_table.rb
rating-0.5.0 spec/support/db/migrate/create_categories_table.rb