mirror of
https://github.com/internetee/registry.git
synced 2025-07-20 01:36:02 +02:00
Merge branch 'master' of github.com:internetee/registry
Conflicts: db/schema.rb
This commit is contained in:
commit
641522ff08
31 changed files with 513 additions and 30 deletions
24
db/migrate/20140925073831_add_devise_to_users.rb
Normal file
24
db/migrate/20140925073831_add_devise_to_users.rb
Normal file
|
@ -0,0 +1,24 @@
|
|||
class AddDeviseToUsers < ActiveRecord::Migration
|
||||
def self.up
|
||||
change_table(:users) do |t|
|
||||
## Database authenticatable
|
||||
t.string :email
|
||||
|
||||
## Trackable
|
||||
t.integer :sign_in_count, default: 0, null: false
|
||||
t.datetime :current_sign_in_at
|
||||
t.datetime :last_sign_in_at
|
||||
t.inet :current_sign_in_ip
|
||||
t.inet :last_sign_in_ip
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :users, :email
|
||||
remove_column :users, :sign_in_count
|
||||
remove_column :users, :current_sign_in_at
|
||||
remove_column :users, :last_sign_in_at
|
||||
remove_column :users, :current_sign_in_ip
|
||||
remove_column :users, :last_sign_in_ip
|
||||
end
|
||||
end
|
5
db/migrate/20140925084916_add_admin_to_users.rb
Normal file
5
db/migrate/20140925084916_add_admin_to_users.rb
Normal file
|
@ -0,0 +1,5 @@
|
|||
class AddAdminToUsers < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :users, :admin, :boolean, default: false
|
||||
end
|
||||
end
|
5
db/migrate/20140925085340_add_identity_code_to_users.rb
Normal file
5
db/migrate/20140925085340_add_identity_code_to_users.rb
Normal file
|
@ -0,0 +1,5 @@
|
|||
class AddIdentityCodeToUsers < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :users, :identity_code, :string
|
||||
end
|
||||
end
|
5
db/migrate/20140925101927_add_registrar_to_users.rb
Normal file
5
db/migrate/20140925101927_add_registrar_to_users.rb
Normal file
|
@ -0,0 +1,5 @@
|
|||
class AddRegistrarToUsers < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :users, :registrar_id, :integer
|
||||
end
|
||||
end
|
13
db/schema.rb
13
db/schema.rb
|
@ -11,7 +11,11 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
<<<<<<< HEAD
|
||||
ActiveRecord::Schema.define(version: 20140925073734) do
|
||||
=======
|
||||
ActiveRecord::Schema.define(version: 20140925101927) do
|
||||
>>>>>>> 662806d8c92f67dda55ee91326dfb5f89ddfc230
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
@ -190,6 +194,15 @@ ActiveRecord::Schema.define(version: 20140925073734) do
|
|||
t.integer "role_id"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.string "email"
|
||||
t.integer "sign_in_count", default: 0, null: false
|
||||
t.datetime "current_sign_in_at"
|
||||
t.datetime "last_sign_in_at"
|
||||
t.inet "current_sign_in_ip"
|
||||
t.inet "last_sign_in_ip"
|
||||
t.boolean "admin", default: false
|
||||
t.string "identity_code"
|
||||
t.integer "registrar_id"
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -23,3 +23,6 @@ elkdata = Registrar.where(
|
|||
).first_or_create
|
||||
|
||||
EppUser.where(username: 'elkdata', password: '8932iods', active: true, registrar: elkdata).first_or_create
|
||||
|
||||
User.where(username: 'gitlab', password: '12345', email: 'enquiries@gitlab.eu', admin: true, identity_code: '37810013855').first_or_create
|
||||
User.where(username: 'zone', password: '54321', email: 'info-info@zone.ee', admin: false, identity_code: '37810010085', registrar_id: zone.id).first_or_create
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue