Files
adamantium/config/db/migrate/20240330213418_create_reactions.rb
2024-08-05 19:00:09 +10:00

15 lines
304 B
Ruby

# frozen_string_literal: true
ROM::SQL.migration do
change do
create_table :reactions do
primary_key :id
foreign_key :post_id, :posts, null: false
column :visitor_identifier, :text, null: false
index :post_id
unique [:post_id, :visitor_identifier]
end
end
end