@@ -41,8 +41,18 @@ The command to enter PostgreSQL while SSH'd into the server is `psql wecc`.
4141
4242## Making changes to the database
4343
44- Whether it's adding data to the database or changing its schema, it's important
45- to proceed carefully when making changes to the database. Always make sure to
44+ ### Common operations
45+
46+ Some database changes are common operations that are used repeatedly.
47+ For these operations, it's helpful to make a command line tool to make the process easy.
48+
49+ For example, adding a scenario to the database is a common operation. Therefore, we have built
50+ the ` switch db save_scenario ` command to easily do this. (Run ` switch db save_scenario --help ` for details).
51+
52+ ### Custom operations
53+
54+ When running custom operations on the database it's very important
55+ to proceed carefully. Always make sure to
4656** test and keep track of your changes** .
4757
4858Here are the steps to make a change.
@@ -61,9 +71,7 @@ to the convention `YYYY-MM-DD_<script_name>`.
61715 . Open a pull request to add your script to the repository (see [ ` docs/Contribute.md ` ] ( Contribute.md ) )
6272so we can keep track of the changes that have been made.
6373
64- ### Bigger changes
65-
66- Sometimes, it isn't feasible to have your entire change as a single SQL script.
74+ Note that sometimes, it isn't feasible to have your entire change as a single SQL script.
6775One way to make bigger changes is to use a Python script. Use the same process
6876as for the SQL scripts. That is save your Python scripts in the ` /database ` folder.
6977
0 commit comments