Sha256: ae4e86191e9f8ca773fd5f9995b7234e2b96869ae77697eb13c201b334829a4c

Contents?: true

Size: 327 Bytes

Versions: 1

Compression:

Stored size: 327 Bytes

Contents

# frozen_string_literal: true

class CreateArticleTags < ActiveRecord::Migration[7.1]
  def change
    create_table :article_tags, primary_key: %i[article_id tag_id] do |t|
      t.belongs_to :article, null: false, foreign_key: true
      t.belongs_to :tag, null: false, foreign_key: true

      t.timestamps
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
active_record_has-0.1.0 sample/db/migrate/20240711162033_create_article_tags.rb