fixes
This commit is contained in:
@@ -2,6 +2,7 @@ class CreateNoteVersions < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :note_versions do |t|
|
||||
t.column :note_id, :integer, :null => false
|
||||
t.column :post_id, :integer, :null => false
|
||||
t.column :updater_id, :integer, :null => false
|
||||
t.column :updater_ip_addr, "inet", :null => false
|
||||
t.column :x, :integer, :null => false
|
||||
@@ -14,6 +15,7 @@ class CreateNoteVersions < ActiveRecord::Migration
|
||||
end
|
||||
|
||||
add_index :note_versions, :note_id
|
||||
add_index :note_versions, :post_id
|
||||
add_index :note_versions, :updater_id
|
||||
add_index :note_versions, :updater_ip_addr
|
||||
end
|
||||
|
||||
17
db/seeds.rb
17
db/seeds.rb
@@ -66,7 +66,7 @@ end
|
||||
if TagAlias.count == 0
|
||||
puts "Creating tag aliases"
|
||||
|
||||
11.upto(99) do |i|
|
||||
100.upto(199) do |i|
|
||||
TagAlias.create(:antecedent_name => i.to_s, :consequent_name => (i * 100).to_s)
|
||||
end
|
||||
else
|
||||
@@ -76,9 +76,20 @@ end
|
||||
if TagImplication.count == 0
|
||||
puts "Creating tag implictions"
|
||||
|
||||
10_000.upto(10_100) do |i|
|
||||
100_000.upto(100_100) do |i|
|
||||
TagImplication.create(:antecedent_name => i.to_s, :consequent_name => (i * 100).to_s)
|
||||
end
|
||||
else
|
||||
puts "Skipping tag implications"
|
||||
end
|
||||
end
|
||||
|
||||
if Pool.count == 0
|
||||
puts "Creating pools"
|
||||
|
||||
1.upto(20) do |i|
|
||||
pool = Pool.create(:name => i.to_s)
|
||||
33.times do |j|
|
||||
pool.add!(Post.order("random()").first)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user