Allow raw sql in create_table (used for foreign keys).

This commit is contained in:
Brian Stubbs
2012-11-07 12:05:13 -02:00
parent 5a2bb57854
commit eab6ce1fcc

View File

@@ -349,6 +349,7 @@ constraint_sql(Constraint) ->
unique -> "UNIQUE"; unique -> "UNIQUE";
not_null -> "NOT NULL"; not_null -> "NOT NULL";
{default, DefaultValue} -> ["DEFAULT ", value_to_sql(DefaultValue)]; {default, DefaultValue} -> ["DEFAULT ", value_to_sql(DefaultValue)];
{raw, S} when is_list(S) -> S;
_ when is_list(Constraint) -> map_intersperse(fun constraint_sql/1, Constraint, " ") _ when is_list(Constraint) -> map_intersperse(fun constraint_sql/1, Constraint, " ")
end. end.