Sha256: f72089ad42491827a7310a774006c6a0b84f265ce7176f0f22e810cd31721488

Contents?: true

Size: 420 Bytes

Versions: 8

Compression:

Stored size: 420 Bytes

Contents

class AlterProjectsDropVideoUrlConstraint < ActiveRecord::Migration
  def up
    execute "
    ALTER TABLE projects ALTER video_url DROP NOT NULL;
    ALTER TABLE projects DROP CONSTRAINT projects_video_url_not_blank;
    "
  end

  def down
    execute "
    ALTER TABLE projects ALTER video_url SET NOT NULL;
    ALTER TABLE projects ADD CONSTRAINT projects_video_url_not_blank CHECK(video_url <> '');
    "
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
catarse_full-0.1.0 db/migrate/20130117205659_alter_projects_drop_video_url_constraint.rb
catarse_full-0.0.6 db/migrate/20130117205659_alter_projects_drop_video_url_constraint.rb
catarse_full-0.0.5 db/migrate/20130117205659_alter_projects_drop_video_url_constraint.rb
catarse_full-0.0.4 db/migrate/20130117205659_alter_projects_drop_video_url_constraint.rb
catarse_full-0.0.3 db/migrate/20130117205659_alter_projects_drop_video_url_constraint.rb
catarse_full-0.0.2 db/migrate/20130117205659_alter_projects_drop_video_url_constraint.rb
catarse_full-0.0.1 db/migrate/20130117205659_alter_projects_drop_video_url_constraint.rb
catarse_core-1.0.0.beta db/migrate/20130117205659_alter_projects_drop_video_url_constraint.rb