     IF NOT EXISTS(
               SELECT NULL
                 FROM INFORMATION_SCHEMA.COLUMNS
-              WHERE table_name = 'environment'
-                AND table_schema = 'infrastructure'
-                AND column_name = 'deleted'
-            )  THEN
+               WHERE table_name = 'environment'
+                 AND table_schema = 'infrastructure'
+                 AND column_name = 'deleted'
+             )  THEN
       ALTER TABLE `environment` DROP INDEX project_name;
       ALTER TABLE `environment` ADD `deleted` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00';
       ALTER TABLE `environment` ADD UNIQUE KEY `project_name_deleted` (`project`,`name`, `deleted`);

    IF EXISTS(
              SELECT NULL
                FROM INFORMATION_SCHEMA.COLUMNS
              WHERE table_name = 'openshift'
                AND table_schema = 'infrastructure'
                AND column_name = 'project_pattern'
            )  THEN
      ALTER TABLE `openshift` DROP COLUMN `project_pattern`;

    END IF;

    IF NOT EXISTS(
              SELECT NULL
                FROM INFORMATION_SCHEMA.COLUMNS
               WHERE table_name = 'project'
                 AND table_schema = 'infrastructure'
                 AND column_name = 'auto_idle'
             )  THEN
      ALTER TABLE `project` ADD `auto_idle` int(1) NOT NULL default '1';


