Browse Source

Add users table

master
Adrian Short 11 years ago
parent
commit
1dacc2d690
2 changed files with 26 additions and 1 deletions
  1. +16
    -0
      db/migrate/20130222112030_sorcery_core.rb
  2. +10
    -1
      db/schema.rb

+ 16
- 0
db/migrate/20130222112030_sorcery_core.rb View File

@@ -0,0 +1,16 @@
class SorceryCore < ActiveRecord::Migration
def self.up
create_table :users do |t|
t.string :username, :null => false # if you use another field as a username, for example email, you can safely remove this field.
t.string :email, :default => nil # if you use this field as a username, you might want to make it :null => false.
t.string :crypted_password, :default => nil
t.string :salt, :default => nil

t.timestamps
end
end

def self.down
drop_table :users
end
end

+ 10
- 1
db/schema.rb View File

@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.

ActiveRecord::Schema.define(:version => 20130213220036) do
ActiveRecord::Schema.define(:version => 20130222112030) do

create_table "feeds", :force => true do |t|
t.string "title"
@@ -39,4 +39,13 @@ ActiveRecord::Schema.define(:version => 20130213220036) do
t.datetime "updated_at", :null => false
end

create_table "users", :force => true do |t|
t.string "username", :null => false
t.string "email"
t.string "crypted_password"
t.string "salt"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end

end

Loading…
Cancel
Save