Improved migrations.

This commit is contained in:
Martin Edenhofer 2016-08-16 10:29:31 +02:00
parent ffdc782e18
commit f30a53b042
3 changed files with 9 additions and 0 deletions

View file

@ -7,6 +7,9 @@ class UpdateActivityStream < ActiveRecord::Migration
add_column :activity_streams, :permission_id, :integer, null: true
remove_column :activity_streams, :role_id
ActivityStream.connection.schema_cache.clear!
ActivityStream.reset_column_information
Setting.create_or_update(
title: 'sipgate.io integration',
name: 'sipgate_integration',

View file

@ -7,6 +7,9 @@ class UpdateRole < ActiveRecord::Migration
add_column :roles, :preferences, :text, limit: 500.kilobytes + 1, null: true
add_column :roles, :default_at_signup, :boolean, null: true, default: false
Role.connection.schema_cache.clear!
Role.reset_column_information
Role.create_or_update(
id: 1,
name: 'Admin',

View file

@ -7,6 +7,9 @@ class UpdateSettingAuth < ActiveRecord::Migration
change_column :settings, :preferences, :text, limit: 200.kilobytes + 1, null: true
change_column :settings, :state_current, :text, limit: 200.kilobytes + 1, null: true
Setting.connection.schema_cache.clear!
Setting.reset_column_information
Setting.create_if_not_exists(
title: 'Authentication via %s',
name: 'auth_ldap',