<p>In t/postgresql-rename-table-and-field.t:</p>
<pre style='color:#555'>> +
> +my $table = $target_sqlt->get_table('fluff');
> +$table->extra( renamed_from => 'foo' );
> +my $field = $table->get_field('biff');
> +$field->extra( renamed_from => 'bar' );
> +
> +my @diff = SQL::Translator::Diff->new({
> + output_db => 'PostgreSQL',
> + source_schema => $source_sqlt,
> + target_schema => $target_sqlt,
> +})->compute_differences->produce_diff_sql;
> +
> +foreach my $line (@diff) {
> + $line =~ s/\n//g;
> + next if $line =~ /^--/;
> + lives_ok { $dbh->do($line) || die } "$line";
</pre>
<p>Instead of <code>lives_ok { … || die }</code>, set <code>RaiseError</code> (preferrably) or just use <code>ok( … )</code>. </p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/dbsrgits/sql-translator/pull/44/files#r16600503">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/302594__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcyNDMzNzE2NSwiZGF0YSI6eyJpZCI6NDAzODg2NjF9fQ==--740c0ea04711b3e4eeab6e93e18d7e4ca9edd109.gif" width="1" /></p>