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
|
||||
Reference in New Issue
Block a user