diff --git a/data/storage/migrator/mysql_cdr_migration.sql b/data/storage/migrator/mysql_cdr_migration.sql index f2a9d32c2..d1cb6bfd3 100755 --- a/data/storage/migrator/mysql_cdr_migration.sql +++ b/data/storage/migrator/mysql_cdr_migration.sql @@ -55,9 +55,4 @@ END // DELIMITER ; -CALL cgrates.migration(); - -ALTER TABLE cdrs CHANGE COLUMN `usage` `usage_old` DECIMAL(30,9); -ALTER TABLE cdrs ADD `usage` DECIMAL(30); -UPDATE cdrs SET `usage` = `usage_old` * 1000000000 WHERE usage_old IS NOT NULL; -ALTER TABLEX cdrs DROP COLUMN usage_old; \ No newline at end of file +CALL cgrates.migration(); \ No newline at end of file diff --git a/data/storage/migrator/mysql_tables_update.sql b/data/storage/migrator/mysql_tables_update.sql index 7cbeaf335..da020828f 100755 --- a/data/storage/migrator/mysql_tables_update.sql +++ b/data/storage/migrator/mysql_tables_update.sql @@ -72,3 +72,8 @@ CREATE TABLE versions ( + +ALTER TABLE cdrs CHANGE COLUMN `usage` `usage_old` DECIMAL(30,9); +ALTER TABLE cdrs ADD `usage` DECIMAL(30); +UPDATE cdrs SET `usage` = `usage_old` * 1000000000 WHERE usage_old IS NOT NULL; +ALTER TABLE cdrs DROP COLUMN usage_old; \ No newline at end of file