#961 ✓resolved
Martin Gamsjaeger (snusnu)

[dm-constraints] should not migrate constraints for remixable modules

Reported by Martin Gamsjaeger (snusnu) | July 7th, 2009 @ 09:43 PM | in 0.10.0

The following will currently try to migrate fk constraints for the linkables table which never exists because Linkable is only a remixable module and not a real model.

I added a fix for this in my fork at


module Linkable

  include DataMapper::Resource

  is :remixable

  # properties
  property :id,  Serial

  property :via, Integer
  property :by,  Integer

  # associations

  belongs_to :via, 'Link', :source_key => [ :via ]
  belongs_to :by,  'User', :source_key => [ :by  ]

class Project
  include DataMapper::Resource
  # ...
  remix n, :linkables,
    :as => :references,
    :model => 'ProjectReference',
    :for => 'Link'

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket

Referenced by