Archived
another big commit :D
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
class CreateRoles < ActiveRecord::Migration
|
||||
def up
|
||||
create_table :roles do |t|
|
||||
t.string :name
|
||||
t.integer :value
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,23 @@
|
||||
class CreateUsers < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :users do |t|
|
||||
t.string :name, :unique => true, :null => false
|
||||
t.string :password_digest, :null => false
|
||||
t.string :ign, :unique => true, :null => false
|
||||
t.string :email, :unique => true, :null => false
|
||||
t.string :confirm_code, :null => false
|
||||
t.text :about
|
||||
t.string :last_ip
|
||||
t.string :skype, :unique => true
|
||||
t.boolean :skype_public, :default => false
|
||||
t.string :youtube, :unique => true
|
||||
t.string :youtube_channelname
|
||||
t.string :twitter, :unique => true
|
||||
t.datetime :last_login
|
||||
|
||||
t.references :role, :null => false
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
+5
-3
@@ -2,10 +2,12 @@ class CreateBlogposts < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :blogposts do |t|
|
||||
t.string :title
|
||||
t.text :text
|
||||
t.references :user
|
||||
t.text :content
|
||||
|
||||
t.references :user_author
|
||||
t.references :user_editor
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
+4
-2
@@ -1,8 +1,10 @@
|
||||
class CreateComments < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :comments do |t|
|
||||
t.text :text
|
||||
t.integer :user_id
|
||||
t.text :content
|
||||
|
||||
t.references :user_author
|
||||
t.references :user_editor
|
||||
t.references :blogpost
|
||||
|
||||
t.timestamps
|
||||
@@ -0,0 +1,10 @@
|
||||
class CreateForumgroups < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :forumgroups do |t|
|
||||
t.string :name
|
||||
t.integer :position
|
||||
t.integer :read_permission
|
||||
t.integer :write_permission
|
||||
end
|
||||
end
|
||||
end
|
||||
+5
-4
@@ -1,11 +1,12 @@
|
||||
class CreateForums < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :forums do |t|
|
||||
t.string "name"
|
||||
t.integer "position"
|
||||
t.references :forumgroup
|
||||
t.string :name
|
||||
t.integer :position
|
||||
t.integer :read_permission
|
||||
t.integer :write_permission
|
||||
|
||||
t.timestamps
|
||||
t.references :forumgroup
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,17 @@
|
||||
class CreateForumthreads < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :forumthreads do |t|
|
||||
t.string :title
|
||||
t.text :content
|
||||
t.boolean :sticky, :default => false
|
||||
t.boolean :locked, :default => false
|
||||
|
||||
t.references :user_author
|
||||
t.references :user_editor
|
||||
|
||||
t.references :forum
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,20 +0,0 @@
|
||||
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.string :skype
|
||||
t.boolean :skype_public, :default => false
|
||||
t.datetime :last_login
|
||||
t.datetime :last_active
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,5 +0,0 @@
|
||||
class AddYoutubeToUsers < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :users, :youtube, :string
|
||||
end
|
||||
end
|
||||
@@ -1,8 +0,0 @@
|
||||
class AddYoutubeChannelname < ActiveRecord::Migration
|
||||
def up
|
||||
add_column :users, :youtube_channelname, :string
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
||||
@@ -1,5 +0,0 @@
|
||||
class AddTwitterToUsers < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :users, :twitter, :string
|
||||
end
|
||||
end
|
||||
@@ -1,9 +0,0 @@
|
||||
class AddForumgroups < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :forumgroups do |t|
|
||||
t.string :name
|
||||
t.integer :position
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,12 @@
|
||||
class AddSessionsTable < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :sessions do |t|
|
||||
t.string :session_id, :null => false
|
||||
t.text :data
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
add_index :sessions, :session_id
|
||||
add_index :sessions, :updated_at
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user