bookstore/db/migrate/20210319142059_create_authors_books.rb
2021-03-22 04:38:35 +01:00

13 lines
282 B
Ruby

# frozen_string_literal: true
# Create association table between authors and books
class CreateAuthorsBooks < ActiveRecord::Migration[6.1]
def change
create_table :authors_books do |t|
t.belongs_to :book
t.belongs_to :author
t.timestamps
end
end
end