def create_constraints_statement(constraint_name, constraint_type, source_storage_name, source_keys, target_storage_name, target_keys)
DataMapper::Ext::String.compress_lines("ALTER TABLE \#{quote_name(source_storage_name)}\nADD CONSTRAINT \#{quote_name(constraint_name)}\nFOREIGN KEY (\#{source_keys.join(', ')})\nREFERENCES \#{quote_name(target_storage_name)} (\#{target_keys.join(', ')})\n\#{\"ON DELETE \" + constraint_type if constraint_type && constraint_type != \"NO ACTION\"}\nINITIALLY DEFERRED DEFERRABLE\n")
end