Displaying 1 result from an estimated 1 matches for "artist_typ".
Did you mean:
artist_type
2006 Jun 21
1
Migration with foreign key won''t work
...ubyonrails.org/rails/pages/Foreign+Key+Schema+Dumper+Plugin/versions/12
I have created the following migration file:
class AddArtistsTable < ActiveRecord::Migration
def self.up
create_table :artists, :force => true do |t|
t.column :name, :string, :limit => 100
t.column :artist_type_id, :integer
t.column :about, :text
end
create_table :artist_types, :force => true do |t|
t.column :artist_type, :string, :limit => 20
t.column :description, :string, :limit => 20
end
# Foreign Keys
add_foreign_key_constraint :artists, :artist_type_...