# Quick question: making tables without id fields; migrations

**URL:** <https://www.ruby-forum.com/t/quick-question-making-tables-without-id-fields-migrations/113809>\
**Category:** Rails\
**Created:** [September 5, 2007, 6:48am UTC](https://www.ruby-forum.com/t/quick-question-making-tables-without-id-fields-migrations/113809 "2007-09-05T06:48:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![smc7000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ed655f/32.png) [@smc7000](https://www.ruby-forum.com/u/smc7000)\
**Post date:** [September 5, 2007, 6:48am UTC](https://www.ruby-forum.com/t/quick-question-making-tables-without-id-fields-migrations/113809/1 "2007-09-05T06:48:21Z")

</div>

I just started a tagging system for my site and I was getting funky  
errors when adding tags. I looked at the the data in the tables and  
realized that rails was only allowing me to save each tag once! Which  
meant that if i saved a tag for post 1, then i couldn’t associate that  
tag with any other post.

Some head-scratching and cursing later, I remembered that join tables in  
HABTM relationships can’t have id fields. Awesome! I can fix it.

Tha only problem is I don’t know how I would do that (make a table with  
no id column) using migrations. Anybody know?

---

<div class="post-metadata">

**Author:** ![smc7000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ed655f/32.png) [@smc7000](https://www.ruby-forum.com/u/smc7000)\
**Post date:** [September 5, 2007, 6:55am UTC](https://www.ruby-forum.com/t/quick-question-making-tables-without-id-fields-migrations/113809/2 "2007-09-05T06:55:34Z")

</div>

Never mind! Got it!

:id =\> false

XD
