Mercurial > pub > Impl
diff Lib/IMPL/SQL/Schema/Table.pm @ 271:56364d0c4b4f
+IMPL::SQL::Schema::MySQL: added basic support for MySQL
author | cin |
---|---|
date | Mon, 28 Jan 2013 02:43:14 +0400 |
parents | dacfe7c0311a |
children | 4ddb27ff4a0b |
line wrap: on
line diff
--- a/Lib/IMPL/SQL/Schema/Table.pm Fri Jan 25 00:25:02 2013 +0400 +++ b/Lib/IMPL/SQL/Schema/Table.pm Mon Jan 28 02:43:14 2013 +0400 @@ -36,12 +36,6 @@ $this->InsertColumn($_) foreach @{$args{columns}}; } - - if ($args{constraints}) { - die new IMPL::InvalidOperationException('A constraints property should be a reference to an array') unless ref $args{constraints} eq 'ARRAY'; - - $this->AddConstraint($_) foreach @{$args{constraints}}; - } } sub InsertColumn { @@ -181,6 +175,8 @@ $type = IMPL::SQL::Schema::Constraint->ResolveAlias($type) or die new IMPL::Exception("Can't resolve a constraint alias",$_[0]); + $params = {%{$params}}; + $params->{table} = $this; $this->AddConstraint($type->new(%$params));