diff _test/Test/SQL/Schema.pm @ 168:6148f89bb7bf

IMPL::SQL::Schema::Traits::Diff alfa version IMPL::lang added hash traits
author sourcer
date Mon, 16 May 2011 04:30:38 +0400
parents 76515373dac0
children 4d0e1962161c
line wrap: on
line diff
--- a/_test/Test/SQL/Schema.pm	Thu May 12 08:57:19 2011 +0400
+++ b/_test/Test/SQL/Schema.pm	Mon May 16 04:30:38 2011 +0400
@@ -79,7 +79,7 @@
 	my $tableUser = $this->schemaDB->GetTable('User');
 	my $tableRole = $this->schemaDB->GetTable('Role');
 	
-	$tableUser->SetPrimaryKey('Id');
+	$tableUser->AddConstraint( pk => { columns => ['Id'], name => 'PK' });
 	$tableRole->SetPrimaryKey('Id');
 	
 	$tableUser->primaryKey->HasColumn('Id') or failed "A primary key of 'User' table should contain 'Id' column";