Sha256: 0e296211c4ed8e55225554b14486c21d2b3f398fdf732ee37131e80d32f2c71a
Contents?: true
Size: 836 Bytes
Versions: 83
Compression:
Stored size: 836 Bytes
Contents
class EncryptOrganizationSettings < PandaPal::MiscHelper::MigrationClass 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
83 entries across 83 versions & 1 rubygems