# Create a table for a new migration

**URL:** <https://www.ruby-forum.com/t/create-a-table-for-a-new-migration/143555>\
**Category:** Ruby\
**Created:** [July 20, 2008, 1:57pm UTC](https://www.ruby-forum.com/t/create-a-table-for-a-new-migration/143555 "2008-07-20T13:57:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![z4n9ief](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/7993a0/32.png) [@z4n9ief](https://www.ruby-forum.com/u/z4n9ief)\
**Post date:** [July 20, 2008, 1:57pm UTC](https://www.ruby-forum.com/t/create-a-table-for-a-new-migration/143555/1 "2008-07-20T13:57:37Z")

</div>

Hi everybody,

I had generated some migrations files such as  
“20080719111013\_create\_countries.rb” for “countries” table :

class CreateCountries \< ActiveRecord::Migration  
def self.up  
create\_table :countries, :force =\> true do |t|  
t.string :name, :null =\> false, :limit =\> 80  
end  
end

def self.down  
drop\_table :countries  
end  
end

And now I would like to generate a new file migration for  
“arts\_countries” table. But I don’t know how to write the nice command  
with the right convention because this table is composed by arts and  
countries tables (so there isn’t any model)…

Thanks for every ideas.  
Zhang’

---

<div class="post-metadata">

**Author:** ![z4n9ief](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/7993a0/32.png) [@z4n9ief](https://www.ruby-forum.com/u/z4n9ief)\
**Post date:** [July 20, 2008, 2:25pm UTC](https://www.ruby-forum.com/t/create-a-table-for-a-new-migration/143555/2 "2008-07-20T14:25:46Z")

</div>

Oops! sorry. I thought I was in a Rails forum. Sorry again.
