X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F47postgres-producer.t;h=5dc7cccd9358e58dac3be36eb0697617d07d8aa9;hb=a25ac5d2649e414439ab60a075297361f2e5819d;hp=ba9f44d3bd006f30347301bee3f978b6ed30fd2f;hpb=75b8fbe8947a071a0ed53750af2e6f24a0ab2a40;p=dbsrgits%2FSQL-Translator.git diff --git a/t/47postgres-producer.t b/t/47postgres-producer.t index ba9f44d..5dc7ccc 100644 --- a/t/47postgres-producer.t +++ b/t/47postgres-producer.t @@ -112,7 +112,7 @@ my $view1 = SQL::Translator::Schema::View->new( my $create_opts = { add_replace_view => 1, no_comments => 1 }; my $view1_sql1 = SQL::Translator::Producer::PostgreSQL::create_view($view1, $create_opts); -my $view_sql_replace = "CREATE OR REPLACE VIEW view_foo ( id, name ) AS ( +my $view_sql_replace = "CREATE VIEW view_foo ( id, name ) AS ( SELECT id, name FROM thing );\n\n"; is($view1_sql1, $view_sql_replace, 'correct "CREATE OR REPLACE VIEW" SQL'); @@ -128,7 +128,7 @@ my $view2 = SQL::Translator::Schema::View->new( my $create2_opts = { add_replace_view => 1, no_comments => 1 }; my $view2_sql1 = SQL::Translator::Producer::PostgreSQL::create_view($view2, $create2_opts); -my $view2_sql_replace = "CREATE OR REPLACE TEMPORARY VIEW view_foo2 AS ( +my $view2_sql_replace = "CREATE TEMPORARY VIEW view_foo2 AS ( SELECT id, name FROM thing ) WITH CASCADED CHECK OPTION;\n\n"; is($view2_sql1, $view2_sql_replace, 'correct "CREATE OR REPLACE VIEW" SQL 2');