Browse Source

[Update] 增加脚本导入migration sql

pull/2067/head
ibuler 6 years ago
parent
commit
5f68f6cb69
  1. 20
      utils/1.4.4_to_1.4.5_migrations.sh
  2. 53
      utils/django_migrations.sql

20
utils/1.4.4_to_1.4.5_migrations.sh

@ -0,0 +1,20 @@
#!/bin/bash
#
host=127.0.0.1
port=3306
username=root
db=jumpserver
echo "备份原来的 migrations"
mysqldump -u${username} -h${host} -P${port} -p ${db} django_migrations > django_migrations.sql.bak
ret=$?
if [ ${ret} == "0" ];then
echo "开始使用新的migrations文件"
mysql -u${username} -h${host} -P${port} -p ${db} < django_migrations.sql
else
echo "Not valid"
fi

53
utils/django_migrations.sql

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save