Sha256: 180b2eccb199644d45fa4acff9f56af0d2b5cbc82cf1ae11ddc28991f25a8712
Contents?: true
Size: 715 Bytes
Versions: 1
Compression:
Stored size: 715 Bytes
Contents
class CreateMyForumUsers < ActiveRecord::Migration def self.up create_table :my_forum_users do |t| t.string :login t.string :password t.string :salt t.string :email t.integer :posts_count t.boolean :is_admin, default: false t.boolean :is_moderator, default: false t.boolean :is_deleted, default: false t.boolean :permanently_banned, default: false t.timestamps null: false t.timestamp :last_logged_in end MyForum::User.reset_column_information user = MyForum::User.new(login: 'admin', password: 'admin', is_admin: true, email: 'admin@example.com') user.save end def self.down drop_table :my_forum_users end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
my_forum-0.0.1.beta1 | db/migrate/20141118131215_create_my_forum_users.rb |