summaryrefslogtreecommitdiffstats
path: root/schema/mysql-migrations/upgrade_122.sql
blob: 6a94e05d08d170c157bf453781357bdb10375d57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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());