Note we're excluding a few files: * Configuration files that weren't generated by us * Migration files that weren't generated by us * The Gemfile, since it includes an important comment that must be on the same line as the gem declaration * The Budget::Stats class, since the heading statistics are a mess and having shorter lines would require a lot of refactoring
17 lines
471 B
Ruby
17 lines
471 B
Ruby
class CreateInappropiateFlags < ActiveRecord::Migration[4.2]
|
|
def change
|
|
create_table :inappropiate_flags do |t|
|
|
t.belongs_to :user, index: true, foreign_key: true
|
|
|
|
t.string :flaggable_type
|
|
t.integer :flaggable_id
|
|
|
|
t.timestamps
|
|
end
|
|
|
|
add_index :inappropiate_flags, [:flaggable_type, :flaggable_id]
|
|
add_index :inappropiate_flags, [:user_id, :flaggable_type, :flaggable_id],
|
|
name: "access_inappropiate_flags"
|
|
end
|
|
end
|