* rename new column because it's not working for reasons I can't understand on the build server

This commit is contained in:
Seth Call 2014-07-30 21:05:59 -05:00
parent 2aab3c902d
commit 9544e3d075
4 changed files with 4 additions and 5 deletions

View File

@ -1,3 +1,3 @@
-- https://jamkazam.atlassian.net/browse/VRFS-1951
-- we need to know the environment in the database for advanced behaviors
ALTER TABLE generic_state ADD COLUMN environment VARCHAR(255) NOT NULL DEFAULT 'development';
ALTER TABLE generic_state ADD COLUMN env VARCHAR(255) NOT NULL DEFAULT 'development';

View File

@ -4,11 +4,11 @@ module JamRuby
self.table_name = 'generic_state'
validates :environment, :inclusion => {:in => ['development', 'staging', 'production', 'test']}
validates :env, :inclusion => {:in => ['development', 'staging', 'production', 'test']}
def self.allow_emails?
database_environment = singleton.environment
database_environment = singleton.env
# if the database says we are in production/staging, then the config has to also agree and say we are in production/staging to send emails
# this is to protect against developers loading a staging or production environment and possibly sending emails to

View File

@ -4,7 +4,7 @@ describe GenericState do
def database_env (env)
singleton = GenericState.singleton
singleton.environment = env
singleton.env = env
singleton.save!
end

View File

@ -28,7 +28,6 @@ bputs "before db_config load"
db_config = YAML::load(File.open('config/database.yml'))["test"]
# initialize ActiveRecord's db connection\
bputs "before recreate db"
SpecDb::recreate_database(db_config)