先./ba一下
1 新建WMSDB
CREATE USER wmsuser WITH PASSWORD 'abc@1234';
GRANT ALL PRIVILEGES ON DATABASE wmsdb TO wmsuser;
GRANT ALL PRIVILEGES ON SCHEMA public TO wmsuser;
ALTER USER wmsuser SET client_encoding TO 'utf8';
ALTER USER wmsuser SET default_transaction_isolation TO 'read committed';
ALTER USER wmsuser SET timezone TO 'UTC';
2 安装postgresql适配器
pip install psycopg2-binary
3 先把原有的数据库进行运行迁移
python manage.py migrate
4 运行数据迁移脚本