# Test Data Migration

**URL:** <https://www.ruby-forum.com/t/test-data-migration/115023>\
**Category:** Rails\
**Created:** [September 19, 2007, 8:40pm UTC](https://www.ruby-forum.com/t/test-data-migration/115023 "2007-09-19T20:40:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mauricio](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/90db22/32.png) [@mauricio](https://www.ruby-forum.com/u/mauricio)\
**Post date:** [September 19, 2007, 8:40pm UTC](https://www.ruby-forum.com/t/test-data-migration/115023/1 "2007-09-19T20:40:58Z")

</div>

I had previously made a migration to add test data into my database.  
The two tables in particular is one called ‘resources’ and one called  
‘permits’. Everything worked fine.

I then switched the ‘permits’ table to contain foreign keys from  
‘resources’ and now the migration successfully runs, without any  
errors, but the ‘permits’ table comes up empty. The ‘resources’ table  
still populates normally.

I am using the HABTM relationship between the two tables.

Is there something special now that I should be doing in order to add  
permits into the db?
