我在我的模型中添加了一个新字段。从 django manage.py 我如何打印迁移(更改表语句)。以下 is_tag 是我的新字段
当我执行 sqlall 时,我得到以下输出。如何获取更改表命令
root@rajeev-laptop:/opt/labs/labs_site# python manage.py sqlall content
BEGIN;
CREATE TABLE `content_content` (
`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
`name` varchar(255) NOT NULL,
`uploaded_by_id` integer NOT NULL,
`is_local` integer NOT NULL,
`access` integer NOT NULL,
`fq_name` varchar(255) NOT NULL,
`description` longtext NOT NULL,
`is_tag` bool NOT NULL,
`timestamp` datetime NOT NULL
)
;
ALTER TABLE `content_content` ADD CONSTRAINT `uploaded_by_id_refs_id_4f9cfefd` FOREIGN KEY (`uploaded_by_id`) REFERENCES `users_userprofile` (`id`);
CREATE INDEX `content_content_1bc5ce19` ON `content_content` (`uploaded_by_id`);
COMMIT;