diff options
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20130111111747_add_secret_token_to_gs_parameter.rb | 10 | ||||
-rw-r--r-- | db/schema.rb | 2 |
2 files changed, 11 insertions, 1 deletions
diff --git a/db/migrate/20130111111747_add_secret_token_to_gs_parameter.rb b/db/migrate/20130111111747_add_secret_token_to_gs_parameter.rb new file mode 100644 index 0000000..bb99ace --- /dev/null +++ b/db/migrate/20130111111747_add_secret_token_to_gs_parameter.rb @@ -0,0 +1,10 @@ +class AddSecretTokenToGsParameter < ActiveRecord::Migration + def up + require 'securerandom' + GsParameter.create(:name => 'SECRET_TOKEN', :section => 'Cookies', :value => SecureRandom.hex(64), :class_type => 'String') + end + + def down + GsParameter.where(:name => 'SECRET_TOKEN').destroy_all + end +end diff --git a/db/schema.rb b/db/schema.rb index 2c14be3..bc7693b 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20130110205056) do +ActiveRecord::Schema.define(:version => 20130111111747) do create_table "access_authorizations", :force => true do |t| t.string "access_authorizationable_type" |