From 09cbf97f439b616bc58b59bba7f8ebb249fdefb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Pi=C4=8Dman?= Date: Wed, 23 Apr 2025 10:44:54 +0200 Subject: [PATCH] #358 Removing a not-null column imposible --- db/migrate/20120601054047_alter_custom_workflows.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/db/migrate/20120601054047_alter_custom_workflows.rb b/db/migrate/20120601054047_alter_custom_workflows.rb index 4a55ea6..6a744a2 100644 --- a/db/migrate/20120601054047_alter_custom_workflows.rb +++ b/db/migrate/20120601054047_alter_custom_workflows.rb @@ -26,9 +26,7 @@ class AlterCustomWorkflows < ActiveRecord::Migration[4.2] t.remove :project_id # TODO: The column cannot be removed on SQL server due to NOT NULL constraint. # The constraint's name is random and therefore cannot be easily removed. - if ActiveRecord::Base.connection.adapter_name.downcase != 'sqlserver' - t.remove :is_enabled - end + t.remove :is_enabled if ActiveRecord::Base.connection.adapter_name.downcase != 'sqlserver' t.string :name, null: false, default: '' t.string :description, :string, null: false, default: '' t.integer :position, :integer, null: false, default: 1