File tree Expand file tree Collapse file tree 3 files changed +10
-10
lines changed
functions_scripts/applications/database Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ readonly ACTION="${2}"
2121shift 2
2222
2323case " ${ACTION} " in
24- # Name :
24+ # Action :
2525 # import
2626 # Description:
2727 # Import data from a JSON file.
@@ -46,7 +46,7 @@ case "${ACTION}" in
4646 mongoimport --db " ${DB_NAME} " --file " ${1} " ${opts}
4747 ;;
4848
49- # Name :
49+ # Action :
5050 # export_to_json_file
5151 # Description:
5252 # Export the data to a JSON file.
@@ -70,7 +70,7 @@ case "${ACTION}" in
7070 mongoexport --db " ${DB_NAME} " ${opts} --jsonArray
7171 ;;
7272
73- # Name :
73+ # Action :
7474 # dump_to_bson_files
7575 # Description:
7676 # Dump the database to BSON files.
@@ -91,7 +91,7 @@ case "${ACTION}" in
9191 mongodump --db " ${DB_NAME} " ${opts}
9292 ;;
9393
94- # Name :
94+ # Action :
9595 # restore_from_bson_files
9696 # Description:
9797 # Restore data from one or more BSON files.
@@ -107,7 +107,7 @@ case "${ACTION}" in
107107 mongorestore " ${1} "
108108 ;;
109109
110- # Name :
110+ # Action :
111111 # drop
112112 # Description:
113113 # Drop the database.
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ if [ "$#" -lt 1 ]; then
1616fi
1717
1818case " ${1} " in
19- # Name :
19+ # Action :
2020 # drop_all
2121 # Description:
2222 # Drop all databases.
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ readonly ACTION="${3}"
2222shift 3
2323
2424case " ${ACTION} " in
25- # Name :
25+ # Action :
2626 # create_from_file
2727 # Description:
2828 # Create the database from an SQL file.
@@ -45,7 +45,7 @@ case "${ACTION}" in
4545 fi
4646 ;;
4747
48- # Name :
48+ # Action :
4949 # drop_all_tables
5050 # Description:
5151 # Drop all tables in the database.
@@ -71,7 +71,7 @@ case "${ACTION}" in
7171 mysql -u" ${DB_USER} " -e " ${query} "
7272 ;;
7373
74- # Name :
74+ # Action :
7575 # clear_all_tables
7676 # Description:
7777 # Clear all tables in the database.
@@ -84,7 +84,7 @@ case "${ACTION}" in
8484 rm ./db_export_tmp.sql
8585 ;;
8686
87- # Name :
87+ # Action :
8888 # export
8989 # Description:
9090 # Export the database.
You can’t perform that action at this time.
0 commit comments