Move DB dir
This commit is contained in:
14
config/db/migrate/20240330213418_create_reactions.rb
Normal file
14
config/db/migrate/20240330213418_create_reactions.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
# 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
|
Reference in New Issue
Block a user