diff --git a/app/models/user.rb b/app/models/user.rb index ff6a149..c0595e9 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -8,10 +8,7 @@ :trackable, :validatable, :confirmable, :omniauthable, :omniauth_providers => [:shibboleth] #associations between tables - belongs_to :user_type - belongs_to :user_status has_many :answers - has_many :user_org_roles has_many :project_groups, :dependent => :destroy has_many :user_role_types, through: :user_org_roles belongs_to :language @@ -49,7 +46,7 @@ :other_organisation, :accept_terms, :role_ids, :dmponline3, :api_token, :organisation, :language, :language_id - validates :email, email: true, allow_nil: true, uniqueness: true + #validates :email, email: true, allow_nil: true, uniqueness: true # FIXME: The duplication in the block is to set defaults. It might be better if # they could be set in Settings::PlanList itself, if possible. diff --git a/db/migrate/20161115105808_drop_unused_user_tables.rb b/db/migrate/20161115105808_drop_unused_user_tables.rb new file mode 100644 index 0000000..9558098 --- /dev/null +++ b/db/migrate/20161115105808_drop_unused_user_tables.rb @@ -0,0 +1,9 @@ +class DropUnusedUserTables < ActiveRecord::Migration + def change + drop_table :user_statuses + remove_column :users, :user_status_id + drop_table :user_role_types + drop_table :user_types + remove_column :users, :user_type_id + end +end