Django ContentType组件–数据库多态关联
https://www.diandian100.cn/3d38b118.html
select
table_schema as ‘数据库’,
table_name as ‘表名’,
table_rows as ‘记录数’,
truncate(data_length/1024/1024, 2) as ‘数据容量(MB)’,
truncate(index_length/1024/1024, 2) as ‘索引容量(MB)’
from information_schema.tables
where table_schema=‘ad_world’
order by data_length desc, index_length desc;
mydumper -u root -h 10.200.1.79 -p 12345678 -B databases_test -s 1000000000 -P 3306 -o /home/cyberpeace/db/
myloader -u root -p 123456 -h 127.0.0.1 -B databases_test -d /data/backup/mysql/
本文详细介绍了Django ContentType组件的使用,它允许你在数据库层面实现多态关联。通过ContentType,你可以动态地操作不同模型的对象,实现灵活的数据操作和关联。同时,文章还提供了一个SQL查询示例,展示如何查询数据库的表信息,并提到了mydumper和myloader这两个数据库备份和恢复工具的使用方法。

1546

被折叠的 条评论
为什么被折叠?



