Lines 36-49
GetOptions(
Link Here
|
36 |
'help|h' => \$cmd_args->{help}, |
36 |
'help|h' => \$cmd_args->{help}, |
37 |
'renumber' => \$cmd_args->{renumber}, |
37 |
'renumber' => \$cmd_args->{renumber}, |
38 |
'reset' => \$cmd_args->{reset}, |
38 |
'reset' => \$cmd_args->{reset}, |
39 |
'schema:s' => \$cmd_args->{schema}, |
39 |
'schema:s' => \$cmd_args->{schema_file}, |
40 |
'table:s' => \$cmd_args->{table}, |
40 |
'table:s' => \$cmd_args->{table}, |
41 |
'verbose|v' => \$cmd_args->{verbose}, |
41 |
'verbose|v' => \$cmd_args->{verbose}, |
42 |
); |
42 |
); |
43 |
$cmd_args->{dry_run} = !$cmd_args->{commit}; |
43 |
$cmd_args->{dry_run} = !$cmd_args->{commit}; |
44 |
|
44 |
|
45 |
my $commenter = Koha::Database::Commenter->new({ |
45 |
my $commenter = Koha::Database::Commenter->new({ |
46 |
database => delete $cmd_args->{database}, dbh => C4::Context->dbh, schema_file => delete $cmd_args->{schema}, |
46 |
database => delete $cmd_args->{database}, dbh => C4::Context->dbh, schema_file => delete $cmd_args->{schema_file}, |
47 |
}); |
47 |
}); |
48 |
my $messages = $cmd_args->{verbose} || $cmd_args->{dry_run} ? [] : undef; |
48 |
my $messages = $cmd_args->{verbose} || $cmd_args->{dry_run} ? [] : undef; |
49 |
if( $cmd_args->{help} ) { |
49 |
if( $cmd_args->{help} ) { |
Lines 94-102
misc/maintenance/sync_db_comments.pl
Link Here
|
94 |
Clear all column comments in database. |
94 |
Clear all column comments in database. |
95 |
The verbose flag shows all issued ALTER TABLE statements. |
95 |
The verbose flag shows all issued ALTER TABLE statements. |
96 |
|
96 |
|
97 |
misc/maintance/sync_db_comments.pl -reset -commit -database mydb -table items |
97 |
misc/maintance/sync_db_comments.pl -reset -commit -database mydb -table items -schema newstructure.sql |
98 |
Only resets comments in items table. |
98 |
Only resets comments in items table. |
99 |
Operates on specific database instead of the one from $KOHA_CONF. |
99 |
Operates on specific database instead of the one from $KOHA_CONF. |
|
|
100 |
Reads the schema from the specified file instead of default one. |
100 |
|
101 |
|
101 |
misc/maintance/sync_db_comments.pl -renumber |
102 |
misc/maintance/sync_db_comments.pl -renumber |
102 |
Renumbers all comments like Comment_1,2,.. |
103 |
Renumbers all comments like Comment_1,2,.. |
103 |
- |
|
|