mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-06 10:30:31 +08:00
17 lines
444 B
Ruby
17 lines
444 B
Ruby
# 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
|