many things, comments working.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
class CreateUsers < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :users do |t|
|
||||
create_table :users do |t|
|
||||
t.string :name, :unique => true, :null => false
|
||||
t.string :ign, :unique => true, :null => false
|
||||
t.integer :rank, :default => 10, :null => false
|
||||
@@ -9,6 +9,10 @@ class CreateUsers < ActiveRecord::Migration
|
||||
t.text :about
|
||||
t.string :password_digest, :null => false
|
||||
t.string :last_ip
|
||||
t.string :skype
|
||||
t.boolean :skype_public, :default => false
|
||||
t.datetime :last_login
|
||||
t.datetime :last_active
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
@@ -3,7 +3,7 @@ class CreateBlogposts < ActiveRecord::Migration
|
||||
create_table :blogposts do |t|
|
||||
t.string :title
|
||||
t.text :text
|
||||
t.integer :user_id
|
||||
t.references :user
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
@@ -3,7 +3,7 @@ class CreateComments < ActiveRecord::Migration
|
||||
create_table :comments do |t|
|
||||
t.text :text
|
||||
t.integer :user_id
|
||||
t.integer :blogpost_id
|
||||
t.references :blogpost
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
@@ -38,6 +38,10 @@ ActiveRecord::Schema.define(:version => 20130526020734) do
|
||||
t.text "about"
|
||||
t.string "password_digest", :null => false
|
||||
t.string "last_ip"
|
||||
t.string "skype"
|
||||
t.boolean "skype_public", :default => false
|
||||
t.datetime "last_login"
|
||||
t.datetime "last_active"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
|
||||
19
db/seeds.rb
19
db/seeds.rb
@@ -1,4 +1,21 @@
|
||||
# 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).
|
||||
#
|
||||
User.create(name: "Redstone Sheep", ign: "noobkackboon", email: "theredstonesheep@gmail.com", about: "Hi, I am the admin :)", password: "123", password_confirmation: "123")
|
||||
User.create(
|
||||
name: "Redstone Sheep",
|
||||
ign: "noobkackboon",
|
||||
email: "theredstonesheep@gmail.com",
|
||||
about: "Hi, I am the admin :)",
|
||||
password: "123",
|
||||
password_confirmation: "123",
|
||||
rank: 500
|
||||
)
|
||||
User.create(
|
||||
name: "Tarkztor",
|
||||
ign: "TraksAG",
|
||||
email: "tacko@gmail.com",
|
||||
about: "Hi, I am another user :)",
|
||||
password: "123",
|
||||
password_confirmation: "123",
|
||||
rank: 10
|
||||
)
|
||||
Reference in New Issue
Block a user