discourse/db/migrate/20140304201403_create_badges.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
393 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class CreateBadges < ActiveRecord::Migration[4.2]
2014-03-05 06:52:20 -06:00
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
2017-08-07 10:48:36 -05:00
t.timestamps null: false
2014-03-05 06:52:20 -06:00
end
add_index :badges, [:name], unique: true
end
end