Mercurial > pub > Impl
comparison _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 |
comparison
equal
deleted
inserted
replaced
| 167:1f7a6d762394 | 168:6148f89bb7bf |
|---|---|
| 77 my ($this) = @_; | 77 my ($this) = @_; |
| 78 | 78 |
| 79 my $tableUser = $this->schemaDB->GetTable('User'); | 79 my $tableUser = $this->schemaDB->GetTable('User'); |
| 80 my $tableRole = $this->schemaDB->GetTable('Role'); | 80 my $tableRole = $this->schemaDB->GetTable('Role'); |
| 81 | 81 |
| 82 $tableUser->SetPrimaryKey('Id'); | 82 $tableUser->AddConstraint( pk => { columns => ['Id'], name => 'PK' }); |
| 83 $tableRole->SetPrimaryKey('Id'); | 83 $tableRole->SetPrimaryKey('Id'); |
| 84 | 84 |
| 85 $tableUser->primaryKey->HasColumn('Id') or failed "A primary key of 'User' table should contain 'Id' column"; | 85 $tableUser->primaryKey->HasColumn('Id') or failed "A primary key of 'User' table should contain 'Id' column"; |
| 86 $tableRole->primaryKey->HasColumn('Id') or failed "A primary key of 'Role' table should contain 'Id' column"; | 86 $tableRole->primaryKey->HasColumn('Id') or failed "A primary key of 'Role' table should contain 'Id' column"; |
| 87 | 87 |
