class CreatePostTags < ActiveRecord::Migration[7.0]
  def change
    create_table :post_tags do |t|
      t.references :post, null: false, foreign_key: { to_table: :posts }
      t.references :tag, null: false, foreign_key: { to_table: :tags }
      t.references :created_user, foreign_key: { to_table: :users }
      t.references :deleted_user, foreign_key: { to_table: :users }
      t.timestamps
    end
  end
end
