Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: How to Document Database Schema?
3 points by mleonhard 5 days ago | hide | past | web | favorite | discuss
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?

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact