<p></p>
<p><b>@mohawk2</b> requested changes on this pull request.</p>
<hr>
<p>In <a href="https://github.com/dbsrgits/sql-translator/pull/143#discussion_r967144426">lib/SQL/Translator/Producer/Oracle.pm</a>:</p>
<pre style='color:#555'>> - $index_name = quote($index_name, $qf);
- push @index_defs,
- "CREATE INDEX $index_name on $table_name_q (".
- join( ', ', @fields ).
- ")$index_options";
- }
- elsif ( $index_type eq UNIQUE ) {
- $index_name = $index_name ? mk_name( $index_name )
- : mk_name( $table_name, $index_name || 'i' );
- $index_name = quote($index_name, $qf);
- push @index_defs,
- "CREATE UNIQUE INDEX $index_name on $table_name_q (".
- join( ', ', @fields ).
- ")$index_options";
+ elsif ($index_type eq NORMAL or $index_type eq UNIQUE) {
+ warn "CAlling create index with options: " . Dumper($options) . "\n";
</pre>
<p dir="auto">"CAlling" typo</p>
<hr>
<p>In <a href="https://github.com/dbsrgits/sql-translator/pull/143#discussion_r967145426">lib/SQL/Translator/Producer/Oracle.pm</a>:</p>
<pre style='color:#555'>> @@ -668,19 +655,20 @@ sub create_field {
push @trigger_defs, $trigger;
}
- if ( lc $field->data_type eq 'timestamp' ) {
- my $base_name = $table_name . "_". $field_name;
- my $trig_name = quote(mk_name( $base_name, 'ts' ), $qt);
- my $trigger =
- "CREATE OR REPLACE TRIGGER $trig_name\n".
- "BEFORE INSERT OR UPDATE ON $table_name_q\n".
- "FOR EACH ROW WHEN (new.$field_name_q IS NULL)\n".
- "BEGIN\n".
- " SELECT sysdate INTO :new.$field_name_q FROM dual;\n".
- "END;\n";
-
- push @trigger_defs, $trigger;
- }
+ # Do not create a trigger to insert sysdate to all timestamp fields
+ # if ( lc $field->data_type eq 'timestamp' ) {
</pre>
<p dir="auto">I don't think it's good practice to leave slabs of commented code. If you want to delete it, delete it.</p>
<hr>
<p>In <a href="https://github.com/dbsrgits/sql-translator/pull/143#discussion_r967146578">t/54-oracle-sql-diff.t</a>:</p>
<pre style='color:#555'>> +
+my $d = SQL::Translator::Diff->new
+ ({
+ output_db => 'Oracle',
+ target_db => 'Oracle',
+ source_schema => $s->schema,
+ target_schema => $t->schema,
+ sqlt_args => {quote_identifiers => 1}
+ });
+
+
+my $diff = $d->compute_differences->produce_diff_sql || die $d->error;
+
+ok($diff, 'Diff generated.');
+
+warn "The diff is: " . Dumper($diff);
</pre>
<p dir="auto">I don't think <code class="notranslate">warn</code> in tests is good practice?</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/dbsrgits/sql-translator/pull/143#pullrequestreview-1102428834">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AACJ4AWDSFBBR6GD22RM553V5NDQNANCNFSM57BJTHFA">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AACJ4ASEFZBDRO3WEWDBJKDV5NDQNA5CNFSM57BJTHFKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOIG23VIQ.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><dbsrgits/sql-translator/pull/143/review/1102428834</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/dbsrgits/sql-translator/pull/143#pullrequestreview-1102428834",
"url": "https://github.com/dbsrgits/sql-translator/pull/143#pullrequestreview-1102428834",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>