# Database documentation

**URL:** <https://www.ruby-forum.com/t/database-documentation/152736>\
**Category:** Rails\
**Created:** [November 6, 2008, 11:37pm UTC](https://www.ruby-forum.com/t/database-documentation/152736 "2008-11-06T23:37:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![fernando](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/779978/32.png) [@fernando](https://www.ruby-forum.com/u/fernando)\
**Post date:** [November 6, 2008, 11:37pm UTC](https://www.ruby-forum.com/t/database-documentation/152736/1 "2008-11-06T23:37:37Z")

</div>

so far i havent been able to find a way to document my database with  
rails.  
is this a flaw? a feature? a hidden feature? or they just dont care  
about documenting the database?

---

<div class="post-metadata">

**Author:** ![fernando](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/779978/32.png) [@fernando](https://www.ruby-forum.com/u/fernando)\
**Post date:** [November 7, 2008, 2:31am UTC](https://www.ruby-forum.com/t/database-documentation/152736/2 "2008-11-07T02:31:23Z")

</div>

Fernando wrote:

> so far i havent been able to find a way to document my database with  
> rails.  
> is this a flaw? a feature? a hidden feature? or they just dont care  
> about documenting the database?  
> You could just put comments in your migrations. They are ruby code.

---

<div class="post-metadata">

**Author:** ![fernando](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/779978/32.png) [@fernando](https://www.ruby-forum.com/u/fernando)\
**Post date:** [November 7, 2008, 11:18am UTC](https://www.ruby-forum.com/t/database-documentation/152736/3 "2008-11-07T11:18:12Z")

</div>

On 7 Nov 2008, at 01:30, Norm wrote:

> Fernando wrote:
> 
> > so far i havent been able to find a way to document my database with  
> > rails.  
> > is this a flaw? a feature? a hidden feature? or they just dont care  
> > about documenting the database?  
> > You could just put comments in your migrations. They are ruby code.

That’s not that great, for example a table’s structure can be the  
accretion of multiple migrations.  
The rails way is probably just to keep that sort of stuff in the  
appropriate model (and since the rails way is not to use things like  
triggers and what not, the model encapsulates pretty much all the  
intelligence in the app).

Fred

---

<div class="post-metadata">

**Author:** ![fernando](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/779978/32.png) [@fernando](https://www.ruby-forum.com/u/fernando)\
**Post date:** [November 7, 2008, 2:25pm UTC](https://www.ruby-forum.com/t/database-documentation/152736/4 "2008-11-07T14:25:52Z")

</div>

Along the same lines as Fred suggests, it should be on the model.  
We’ve been using the annotate\_models to do it for us.

[http://agilewebdevelopment.com/plugins/annotate\_models](http://agilewebdevelopment.com/plugins/annotate_models)

-H

On Nov 7, 5:17 am, Frederick C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
