added bans

This commit is contained in:
albert
2010-02-19 17:30:11 -05:00
parent 09cca6f631
commit 703eb6a1b6
11 changed files with 478 additions and 11 deletions

View File

@@ -0,0 +1,20 @@
class CreateBans < ActiveRecord::Migration
def self.up
create_table :bans do |t|
t.column :user_id, :integer
t.column :ip_addr, "inet"
t.column :reason, :text, :null => false
t.column :banner_id, :integer, :null => false
t.column :expires_at, :datetime, :null => false
t.timestamps
end
add_index :bans, :user_id
add_index :bans, :ip_addr
add_index :bans, :expires_at
end
def self.down
drop_table :bans
end
end

View File

@@ -0,0 +1,17 @@
class CreateUserFeedback < ActiveRecord::Migration
def self.up
create_table :user_feedback do |t|
t.column :user_id, :integer, :null => false
t.column :creator_id, :integer, :null => false
t.column :is_positive, :boolean, :null => false
t.column :body, :text, :null => false
t.timestamps
end
add_index :user_feedback, :user_id
end
def self.down
drop_table :user_feedback
end
end