LOTS of stuff
This commit is contained in:
@@ -1,23 +0,0 @@
|
||||
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
|
||||
@@ -1,11 +1,8 @@
|
||||
class CreateRoles < ActiveRecord::Migration
|
||||
def up
|
||||
def change
|
||||
create_table :roles do |t|
|
||||
t.string :name
|
||||
t.integer :value
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
||||
end
|
||||
26
db/migrate/02_create_users.rb
Normal file
26
db/migrate/02_create_users.rb
Normal file
@@ -0,0 +1,26 @@
|
||||
class CreateUsers < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :users do |t|
|
||||
t.string :uuid, unique: true, null: false
|
||||
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.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.boolean :donor, default: false
|
||||
t.string :email_token
|
||||
t.boolean :confirmed, default: false
|
||||
t.datetime :last_seen
|
||||
|
||||
t.references :role, null: false
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,8 +1,8 @@
|
||||
class CreateBlogposts < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :blogposts do |t|
|
||||
t.string :title
|
||||
t.text :content
|
||||
t.string :title
|
||||
t.text :content
|
||||
|
||||
t.references :user_author
|
||||
t.references :user_editor
|
||||
@@ -1,7 +1,7 @@
|
||||
class CreateComments < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :comments do |t|
|
||||
t.text :content
|
||||
t.text :content
|
||||
|
||||
t.references :user_author
|
||||
t.references :user_editor
|
||||
@@ -1,8 +1,8 @@
|
||||
class CreateForumgroups < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :forumgroups do |t|
|
||||
t.string :name
|
||||
t.integer :position
|
||||
t.string :name
|
||||
t.integer :position
|
||||
|
||||
t.references :role_read
|
||||
t.references :role_write
|
||||
@@ -1,8 +1,8 @@
|
||||
class CreateForums < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :forums do |t|
|
||||
t.string :name
|
||||
t.integer :position
|
||||
t.string :name
|
||||
t.integer :position
|
||||
|
||||
t.references :role_read
|
||||
t.references :role_write
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddSessionsTable < ActiveRecord::Migration
|
||||
class CreateSessions < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :sessions do |t|
|
||||
t.string :session_id, :null => false
|
||||
10
db/migrate/09_create_register_tokens.rb
Normal file
10
db/migrate/09_create_register_tokens.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
class CreateRegisterTokens < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :register_tokens, primary_key: :uuid do |t|
|
||||
t.string :uuid, limit: 32, unique: true, primary: true, null: false
|
||||
t.string :token, limit: 6, null: false
|
||||
t.string :email, unique: true, null: false
|
||||
end
|
||||
change_column :register_tokens, :uuid, :string
|
||||
end
|
||||
end
|
||||
13
db/migrate/10_create_threadreplies.rb
Normal file
13
db/migrate/10_create_threadreplies.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
class CreateThreadreplies < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :threadreplies do |t|
|
||||
t.text :content
|
||||
|
||||
t.references :user_author
|
||||
t.references :user_editor
|
||||
t.references :forumthread
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user