Adrian Short 12 лет назад
Родитель
Сommit
1dacc2d690
2 измененных файлов: 26 добавлений и 1 удалений
  1. +16
    -0
      db/migrate/20130222112030_sorcery_core.rb
  2. +10
    -1
      db/schema.rb

+ 16
- 0
db/migrate/20130222112030_sorcery_core.rb Просмотреть файл

@@ -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 Просмотреть файл

@@ -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

Загрузка…
Отмена
Сохранить