fixes #13409 - remove early initialisation of test DB
All models etc. referenced within the Rails environment startup, including in initialisers should load without making any reference to the database. This ensures when running `rake test` without a test DB set up already that the Rails env can be loaded first by Rails before it prepares the test DB from db/schema.rb (itself created by a db:migrate in dev/prod envs).
The table_name for Ptable needed to be overridden, matching ProvisioningTemplate as it defaulted to 'ptables' rather than 'templates' when the `attribute_names` call was removed from validate_inclusion_in_families.
References to attribute_names in API controller wrapping overrides were replaced by reusing the protected_attribute lists, which don't use the database and are also more consistent than the existing lists.
fixes #13409 - remove early initialisation of test DB
All models etc. referenced within the Rails environment startup,
including in initialisers should load without making any reference to
the database. This ensures when running `rake test` without a test DB
set up already that the Rails env can be loaded first by Rails before
it prepares the test DB from db/schema.rb (itself created by a
db:migrate in dev/prod envs).
The table_name for Ptable needed to be overridden, matching
ProvisioningTemplate as it defaulted to 'ptables' rather than
'templates' when the `attribute_names` call was removed from
validate_inclusion_in_families.
References to attribute_names in API controller wrapping overrides
were replaced by reusing the protected_attribute lists, which don't use
the database and are also more consistent than the existing lists.