mirror of
https://github.com/discourse/discourse.git
synced 2024-12-30 08:04:53 +08:00
30990006a9
This reduces chances of errors where consumers of strings mutate inputs and reduces memory usage of the app. Test suite passes now, but there may be some stuff left, so we will run a few sites on a branch prior to merging
17 lines
393 B
Ruby
17 lines
393 B
Ruby
# frozen_string_literal: true
|
|
|
|
class CreateBadges < ActiveRecord::Migration[4.2]
|
|
def change
|
|
create_table :badges do |t|
|
|
t.string :name, null: false
|
|
t.text :description
|
|
t.integer :badge_type_id, index: true, null: false
|
|
t.integer :grant_count, null: false, default: 0
|
|
|
|
t.timestamps null: false
|
|
end
|
|
|
|
add_index :badges, [:name], unique: true
|
|
end
|
|
end
|