eBooru/db/migrate/20220106081415_add_post_events_table.rb
Earlopain fc7d84affd
[RuboCop] Enable Style/FrozenStringLiteralComment
This reduces allocations on the posts page by about 5%, from basic testing
2024-02-25 18:15:55 +01:00

14 lines
387 B
Ruby

# frozen_string_literal: true
class AddPostEventsTable < ActiveRecord::Migration[6.1]
def change
create_table :post_events do |t|
t.references :creator, foreign_key: { to_table: :users }, null: false
t.references :post, null: false
t.integer :action, null: false
t.jsonb :extra_data, null: false
t.datetime :created_at, null: false
end
end
end