0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-09 21:45:25 +08:00
discourse/plugins/discourse-policy/db/migrate/20191013212445_migrate_policy_users_table.rb
2025-07-22 15:07:59 +02:00

17 lines
444 B
Ruby
Vendored

# frozen_string_literal: true
class MigratePolicyUsersTable < ActiveRecord::Migration[5.2]
def change
create_table :policy_users do |t|
t.integer :post_policy_id, null: false
t.integer :user_id, null: false
t.datetime :accepted_at
t.datetime :revoked_at
t.datetime :expired_at
t.string :version
t.timestamps null: false
end
add_index :policy_users, %i[post_policy_id user_id]
end
end