django 2.1.3 通过model获取到建表语句

2020-03-12  本文已影响0人  鸟它鸟
python manage.py makemigrations fault
python manage.py sqlmigrate fault 0001
(python36_fault2) liangjiapengdeMacBook-Pro:xxxx liangjiapeng$ python manage.py sqlmigrate fault 0001
BEGIN;
--
-- Create model Api_List
--
CREATE TABLE `fault_api_list` (`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY, `api_type` varchar(32) NOT NULL, `api_url` varchar(256) NOT NULL, `api_token` varchar(256) NOT NULL);
上一篇下一篇

猜你喜欢

热点阅读