icingaweb2-module-director/schema/mysql-migrations/upgrade_122.sql

13 lines
336 B
MySQL
Raw Normal View History

2016-10-24 21:58:23 +02:00
ALTER TABLE director_generated_file
ADD COLUMN cnt_apply INT(10) UNSIGNED NOT NULL DEFAULT 0;
UPDATE director_generated_file
SET cnt_apply = ROUND(
(LENGTH(content) - LENGTH( REPLACE(content, 'apply ', '') ) )
/ LENGTH('apply ')
);
INSERT INTO director_schema_migration
(schema_version, migration_time)
VALUES (122, NOW());