Sha256: 154a3bc0c4173404b28c86fc8ed2a937ff12a4781f4f30d58696e0e163d60db9
Contents?: true
Size: 828 Bytes
Versions: 28
Compression:
Stored size: 828 Bytes
Contents
class EncryptOrganizationSettings < ActiveRecord::Migration[5.1] def up # don't rerun this if it was already run before we renamed the migration. existing_versions = execute ("SELECT * from schema_migrations where version = '30171205183457'") if (existing_versions.count > 0) execute "DELETE from schema_migrations where version = '30171205183457'" return end rename_column :panda_pal_organizations, :settings, :old_settings add_column :panda_pal_organizations, :encrypted_settings, :text add_column :panda_pal_organizations, :encrypted_settings_iv, :string end def down rename_column :panda_pal_organizations, :old_settings, :settings remove_column :panda_pal_organizations, :encrypted_settings remove_column :panda_pal_organizations, :encrypted_settings_iv end end
Version data entries
28 entries across 28 versions & 1 rubygems