diff _test/Test/SQL/Diff.pm @ 194:4d0e1962161c

Replaced tabs with spaces IMPL::Web::View - fixed document model, new features (control classes, document constructor parameters)
author cin
date Tue, 10 Apr 2012 20:08:29 +0400
parents 47dac58691ee
children 56364d0c4b4f
line wrap: on
line diff
--- a/_test/Test/SQL/Diff.pm	Tue Apr 10 08:13:22 2012 +0400
+++ b/_test/Test/SQL/Diff.pm	Tue Apr 10 20:08:29 2012 +0400
@@ -12,37 +12,37 @@
 __PACKAGE__->PassThroughArgs;
 
 test diff => sub {
-	my $schemaSrc = new IMPL::SQL::Schema(name => 'simple', version => 1 );
-	
-	my $tbl = $schemaSrc->AddTable({
-		name => 'User',
-		columns => [
-			{ name => 'name', type => Varchar(255) },
-			{ name => 'description', type => Varchar(255) }
-		]
-	});
-	
-	$tbl->AddConstraint( unique => { name => 'unique_name', columns => ['name'] });
-	
-	my $schemaDst = new IMPL::SQL::Schema(name => 'simple', version => 2 );
-	
-	my $users = $schemaDst->AddTable({
-		name => 'User',
-		columns => [
-			{ name => 'id', type => Integer },
-			{ name => 'login', type => Varchar(255) },
-			{ name => 'description', type => Text, isNullable => 1 }
-		]
-	});
-	
-	$users->SetPrimaryKey('id');
-	$users->AddConstraint( unique => { name => 'unique_login', columns => ['login'] } );
-	
-	#warn Dumper(IMPL::SQL::Schema::Traits::Diff->Diff($schemaSrc,$schemaDst));
-	
-	$schemaSrc->Dispose;
-	$schemaDst->Dispose;
-	
+    my $schemaSrc = new IMPL::SQL::Schema(name => 'simple', version => 1 );
+    
+    my $tbl = $schemaSrc->AddTable({
+        name => 'User',
+        columns => [
+            { name => 'name', type => Varchar(255) },
+            { name => 'description', type => Varchar(255) }
+        ]
+    });
+    
+    $tbl->AddConstraint( unique => { name => 'unique_name', columns => ['name'] });
+    
+    my $schemaDst = new IMPL::SQL::Schema(name => 'simple', version => 2 );
+    
+    my $users = $schemaDst->AddTable({
+        name => 'User',
+        columns => [
+            { name => 'id', type => Integer },
+            { name => 'login', type => Varchar(255) },
+            { name => 'description', type => Text, isNullable => 1 }
+        ]
+    });
+    
+    $users->SetPrimaryKey('id');
+    $users->AddConstraint( unique => { name => 'unique_login', columns => ['login'] } );
+    
+    #warn Dumper(IMPL::SQL::Schema::Traits::Diff->Diff($schemaSrc,$schemaDst));
+    
+    $schemaSrc->Dispose;
+    $schemaDst->Dispose;
+    
 };