-- Deploy gaia:api_2015_12_11_alter_table_topicreply to mysql
-- tag: 添加对日记本的评论

BEGIN;

ALTER TABLE `api_topicreply` ADD COLUMN `diary_id` INTEGER DEFAULT NULL;
ALTER TABLE `api_topicreply` MODIFY `problem_id` INTEGER DEFAULT NULL;
ALTER TABLE `api_topicreply` ADD CONSTRAINT `api_topicreply_diary_id_refs_api_diary_id_608b2b15` FOREIGN KEY (`diary_id`) REFERENCES `api_diary` (`id`);

COMMIT;
