mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-08 18:59:47 +00:00
update asset
This commit is contained in:
6
utils/clean_migrations.sh
Executable file
6
utils/clean_migrations.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
|
||||
for app in users assets perms audits teminal ops;do
|
||||
rm -f $app/migrations/000*
|
||||
done
|
4
utils/init_db.sh
Executable file
4
utils/init_db.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
|
||||
python ../apps/manage.py loaddata init
|
10
utils/make_fake_json.sh
Normal file
10
utils/make_fake_json.sh
Normal file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
|
||||
python ../apps/manage.py dbshell << EOF
|
||||
delete from django_content_type;
|
||||
delete from auth_permission;
|
||||
EOF
|
||||
|
||||
|
||||
python ../apps/manage.py dumpdata > ../apps/fixtures/init.json
|
18
utils/make_init_json.sh
Normal file
18
utils/make_init_json.sh
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
|
||||
python ../apps/manage.py shell << EOF
|
||||
from users.models import *
|
||||
init_all_models()
|
||||
|
||||
from assets.models import *
|
||||
init_all_models()
|
||||
EOF
|
||||
|
||||
|
||||
python ../apps/manage.py dbshell << EOF
|
||||
delete from django_content_type;
|
||||
delete from auth_permission;
|
||||
EOF
|
||||
|
||||
python ../apps/manage.py dumpdata > ../apps/fixtures/init.json
|
6
utils/make_migrations.sh
Executable file
6
utils/make_migrations.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
|
||||
python ../apps/manage.py makemigrations
|
||||
|
||||
python ../apps/manage.py migrate
|
Reference in New Issue
Block a user