fixes & forums started

This commit is contained in:
jomo
2013-08-02 07:55:32 +02:00
parent 45ebd0bd05
commit e052ad8859
39 changed files with 358 additions and 436 deletions

View File

@@ -0,0 +1,9 @@
class AddForumgroups < ActiveRecord::Migration
def change
create_table :forumgroups do |t|
t.string :name
t.integer :position
t.timestamps
end
end
end

View File

@@ -0,0 +1,11 @@
class CreateForums < ActiveRecord::Migration
def change
create_table :forums do |t|
t.string "name"
t.integer "position"
t.references :forumgroup
t.timestamps
end
end
end

View File

@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20130728003021) do
ActiveRecord::Schema.define(:version => 20130802051521) do
create_table "blogposts", :force => true do |t|
t.string "title"
@@ -29,6 +29,21 @@ ActiveRecord::Schema.define(:version => 20130728003021) do
t.datetime "updated_at", :null => false
end
create_table "forumgroups", :force => true do |t|
t.string "name"
t.integer "position"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "forums", :force => true do |t|
t.string "name"
t.integer "position"
t.integer "forumgroup_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "users", :force => true do |t|
t.string "name", :null => false
t.string "ign", :null => false

View File

@@ -1,24 +1,6 @@
# This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
#
deleted_user = User.new({
name: "Deleted user",
ign: "Steve",
email: "example@example.com",
about: "Hey, apparently, I do no longer exist. This is just a placeholder profile",
password: "D6^w,:A})@/y>@$18u%D2,_@Se{%>$=,14Nc>#Oz4.[eP$X0p'1fW'%=60H{7]i'H);<r:!'Zt$-X58])#!/l;)}=$@'2W>oX(epMK5B2>/l]t(!_T3p,,]e@Uh%]Vq%[~)_~$?=[6S#8%H&JOd#/#|PRH2/q?!]%(#1;6&_*u&%-+&G-dP*j,1x+@+.6]#6{H$]=I",
password_confirmation: "D6^w,:A})@/y>@$18u%D2,_@Se{%>$=,14Nc>#Oz4.[eP$X0p'1fW'%=60H{7]i'H);<r:!'Zt$-X58])#!/l;)}=$@'2W>oX(epMK5B2>/l]t(!_T3p,,]e@Uh%]Vq%[~)_~$?=[6S#8%H&JOd#/#|PRH2/q?!]%(#1;6&_*u&%-+&G-dP*j,1x+@+.6]#6{H$]=I",
rank: 10
})
deleted_user.update_attribute("skype", "echo123")
deleted_user.update_attribute("skype_public", true)
deleted_user.update_attribute("last_ip", "0.0.0.0")
deleted_user.update_attribute("last_login", Time.utc(0).to_datetime)
deleted_user.update_attribute("last_active", Time.utc(0).to_datetime)
deleted_user.update_attribute("created_at", Time.utc(0).to_datetime)
deleted_user.update_attribute("updated_at", Time.utc(0).to_datetime)
deleted_user.save
User.create(
name: "Redstone Sheep",
ign: "noobkackboon",