first release
This commit is contained in:
16
db/migrate/20130518221216_create_users.rb
Normal file
16
db/migrate/20130518221216_create_users.rb
Normal file
@@ -0,0 +1,16 @@
|
||||
class CreateUsers < ActiveRecord::Migration
|
||||
def change
|
||||
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
|
||||
t.boolean :banned, :default => false
|
||||
t.string :email, :unique => true, :null => false
|
||||
t.text :about
|
||||
t.string :password_digest, :null => false
|
||||
t.string :last_ip
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
11
db/migrate/20130526015928_create_blogposts.rb
Normal file
11
db/migrate/20130526015928_create_blogposts.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
class CreateBlogposts < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :blogposts do |t|
|
||||
t.string :title
|
||||
t.text :text
|
||||
t.integer :user_id
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
11
db/migrate/20130526020734_create_comments.rb
Normal file
11
db/migrate/20130526020734_create_comments.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
class CreateComments < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :comments do |t|
|
||||
t.text :text
|
||||
t.integer :user_id
|
||||
t.integer :blogpost_id
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
31
db/schema.rb
31
db/schema.rb
@@ -11,6 +11,35 @@
|
||||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 0) do
|
||||
ActiveRecord::Schema.define(:version => 20130526020734) do
|
||||
|
||||
create_table "blogposts", :force => true do |t|
|
||||
t.string "title"
|
||||
t.text "text"
|
||||
t.integer "user_id"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
|
||||
create_table "comments", :force => true do |t|
|
||||
t.text "text"
|
||||
t.integer "user_id"
|
||||
t.integer "blogpost_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
|
||||
t.integer "rank", :default => 10, :null => false
|
||||
t.boolean "banned", :default => false
|
||||
t.string "email", :null => false
|
||||
t.text "about"
|
||||
t.string "password_digest", :null => false
|
||||
t.string "last_ip"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# 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).
|
||||
#
|
||||
# Examples:
|
||||
#
|
||||
# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
|
||||
# Mayor.create(name: 'Emanuel', city: cities.first)
|
||||
User.create(name: "Redstone Sheep", ign: "noobkackboon", email: "theredstonesheep@gmail.com", about: "Hi, I am the admin :)", password: "123", password_confirmation: "123")
|
||||
|
||||
Reference in New Issue
Block a user