mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 04:03:57 -06:00
a90ad52dff
This is the first in a multi-part change to move the custom fields to a new table. It includes: - Adding a new CategorySetting model and corresponding table. - Populating it with data from the category_custom_fields table.
18 lines
517 B
Ruby
18 lines
517 B
Ruby
# frozen_string_literal: true
|
|
|
|
class CreateCategorySettings < ActiveRecord::Migration[7.0]
|
|
def change
|
|
# Moving the custom fields in core into a dedicated table for
|
|
# better type casting, validations, etc.
|
|
create_table :category_settings do |t|
|
|
t.references :category, null: false, index: { unique: true }
|
|
|
|
t.boolean :require_topic_approval, null: true
|
|
t.boolean :require_reply_approval, null: true
|
|
t.integer :num_auto_bump_daily, null: true
|
|
|
|
t.timestamps
|
|
end
|
|
end
|
|
end
|