Note
This documentation is for the new OMERO 5.2 version. See the latest OMERO 5.1.x version or the previous versions page to find documentation for the OMERO version you are using if you have not upgraded yet.
Rather than try to provide the functionality of a RDBM tool like psql, the omero db script command helps to generate SQL scripts for building your database. You can then use those scripts from whatever tool is most comfortable for you:
$ bin/omero db script --password secretpassword
Using OMERO5.2 for version
Using 0 for patch
Using password from commandline
Saving to /home/omero/OMERO5.2__0.sql
If you do not specify the OMERO root password on the command line you will be prompted to enter it.