fixes & forums started
This commit is contained in:
9
db/migrate/20130802051129_add_forumgroups.rb
Normal file
9
db/migrate/20130802051129_add_forumgroups.rb
Normal 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
|
||||
11
db/migrate/20130802051521_create_forums.rb
Normal file
11
db/migrate/20130802051521_create_forums.rb
Normal 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
|
||||
17
db/schema.rb
17
db/schema.rb
@@ -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
|
||||
|
||||
18
db/seeds.rb
18
db/seeds.rb
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user