Ask HN: How to Document Database Schema?
I'm using Flyway DB to create the initial database tables and apply updates. My API server source code has files like:
V1__Create_tables.sql
V2__Remove_users_table_logout_time_col.sql
I need to know how to maintain documentation of tables and columns. I can put comments in V1__Create_tables.sql but these quickly become out of date. And the subsequently added files contain only ALTER TABLE commands.
Is there a best-practice for database documentation that is compatible with the best-practices for database migrations?