mirror of https://github.com/jumpserver/jumpserver
ibuler
6 years ago
2 changed files with 73 additions and 0 deletions
@ -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 |
||||
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in new issue