# 20130713 (Saturday, 13 July 2013)¶

## Comparing two databases¶

How can you say whether two databases have the same content?

Answer: compare their “diagnostic database reports”, i.e. the output of a manage.py diag on each of them. The main purpose of this report is to have a “hash code” of a database in human-readable form.

I once wrote this command and almost never used it so far.

Now I moved the code to generate this report from lino.management.commands.diag to lino.ui.Site.get_db_overview_rst() and added three test cases that check whether in has the expected result when run on the demo databases for lino_welfare, lino_patrols and lino_faggio.