Generate a migration file

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'

Zangief Ief wrote:

... I would like to generate a new file migration for
"arts_countries" table...

Thanks for every ideas.
Zhang'

ruby script/generate migration CreateArtsCountries

but,
really,
I'd probably create a model too.

ruby script/generate model ArtsCountries art_id:integer
country_id:integer

Hi --

Thanks! That working perfectly :slight_smile:

Hi --