Sha256: 9e16051e4889aca608b6dc0e2b96fc66b6e27b980f34b813ae519755b3147114
Contents?: true
Size: 827 Bytes
Versions: 3
Compression:
Stored size: 827 Bytes
Contents
class DropRunStartMinuteFromApplicationSchedules < ActiveRecord::Migration def up execute <<-SQL ALTER TABLE #{Naf.schema_name}.application_schedules DROP COLUMN run_start_minute; ALTER TABLE #{Naf.schema_name}.application_schedules ALTER COLUMN run_interval SET NOT NULL; ALTER TABLE #{Naf.schema_name}.application_schedules ALTER COLUMN run_interval_style_id SET NOT NULL; SQL end def down execute <<-SQL ALTER TABLE #{Naf.schema_name}.application_schedules ADD COLUMN run_start_minute INTEGER NULL CHECK (run_start_minute >= 0 and run_start_minute < (24 * 60)); ALTER TABLE #{Naf.schema_name}.application_schedules ALTER COLUMN run_interval DROP NOT NULL; ALTER TABLE #{Naf.schema_name}.application_schedules ALTER COLUMN run_interval_style_id DROP NOT NULL; SQL end end
Version data entries
3 entries across 3 versions & 1 rubygems