# Issue a strong warning if alter-foreign-keys-method = none
7864
if ( $alter_fk_method eq 'none' && !$o->get('force') ) {
7865
print STDERR "WARNING! Using alter-foreign-keys-method = \"none\". This will typically cause foreign key violations!\nThis method of handling foreign key constraints is only provided so that the database administrator can disable the tool’s built-in functionality if desired.\n\nContinue anyway? (y/N)";
7866
my $response;
7867
chomp($response = <STDIN>);
7868
if ($response !~ /y|(yes)/i) {
7869
exit 1;
7870
}
7871
}
7872
7863
7873
if ( $alter_fk_method eq 'drop_swap' && !$o->get('drop-new-table') ) {
7864
7874
$o->save_error("--alter-foreign-keys-method=drop_swap does not work with --no-drop-new-table.");
7865
7875
}
9815
9825
9816
9826
my $sql = "SELECT table_schema, table_name "
9817
9827
. "FROM information_schema.key_column_usage "
9818
. "WHERE constraint_schema='$tbl->{db}' "
9828
. "WHERE referenced_table_schema='$tbl->{db}' "
9819
9829
. "AND referenced_table_name='$tbl->{tbl}'";
9820
9830
PTDEBUG && _d($sql);
9821
9831
my $rows = $cxn->dbh()->selectall_arrayref($sql);
11025
11035
documentation and understand how to use this tool. If you have not read the
11026
11036
documentation, then do not specify this option.
11027
11037
11038
=item --force
11039
11040
This options bypasses confirmation in case of using alter-foreign-keys-method = none , which might break foreign key constraints.