Revision 42be914d
Von Bernd Bleßmann vor etwa 7 Jahren hinzugefügt
scripts/dbupgrade2_tool.pl | ||
---|---|---|
41 | 41 |
my ($opt_list, $opt_tree, $opt_rtree, $opt_nodeps, $opt_graphviz, $opt_help); |
42 | 42 |
my ($opt_user, $opt_client, $opt_apply, $opt_applied, $opt_unapplied, $opt_format, $opt_test_utf8); |
43 | 43 |
my ($opt_dbhost, $opt_dbport, $opt_dbname, $opt_dbuser, $opt_dbpassword, $opt_create, $opt_type); |
44 |
my ($opt_description, $opt_encoding, @opt_depends, $opt_auth_db);
|
|
44 |
my ($opt_description, @opt_depends, $opt_auth_db); |
|
45 | 45 |
|
46 | 46 |
our (%myconfig, $form, $user, $auth, $locale, $controls, $dbupgrader); |
47 | 47 |
|
... | ... | |
117 | 117 |
Options for --create: |
118 | 118 |
--type \'sql\' or \'pl\'. Defaults to sql. |
119 | 119 |
--description The description field of the generated upgrade. |
120 |
--encoding Encoding used for the file. Defaults to \'utf8\'. |
|
121 |
Note: Your editor will not be told to open the file in |
|
122 |
this encoding. |
|
123 | 120 |
--depends Tags of upgrades which this upgrade depends upon. |
124 | 121 |
Defaults to the latest stable release upgrade. |
125 | 122 |
Multiple values possible. |
... | ... | |
267 | 264 |
my $dbupgrader = $params{dbupgrader}; |
268 | 265 |
my $type = $params{type} || 'sql'; |
269 | 266 |
my $description = $params{description} || ''; |
270 |
my $encoding = $params{encoding} || 'utf-8'; |
|
271 | 267 |
my @depends = @{ $params{depends} }; |
272 | 268 |
|
269 |
my $encoding = 'utf-8'; |
|
270 |
|
|
273 | 271 |
if (!@depends) { |
274 | 272 |
my @releases = grep { /^release_/ } keys %$controls; |
275 | 273 |
@depends = ((sort @releases)[-1]); |
... | ... | |
295 | 293 |
print $fh "$comment \@tag: $filename\n"; |
296 | 294 |
print $fh "$comment \@description: $description\n"; |
297 | 295 |
print $fh "$comment \@depends: @depends\n"; |
298 |
print $fh "$comment \@encoding: $encoding\n"; |
|
299 | 296 |
|
300 | 297 |
if ($type eq 'pl') { |
301 | 298 |
print $fh "package SL::DBUpgrade2::$filename;\n"; |
... | ... | |
498 | 495 |
"applied" => \$opt_applied, |
499 | 496 |
"create=s" => \$opt_create, |
500 | 497 |
"type=s" => \$opt_type, |
501 |
"encoding=s" => \$opt_encoding, |
|
502 | 498 |
"description=s" => \$opt_description, |
503 | 499 |
"depends=s" => \@opt_depends, |
504 | 500 |
"unapplied" => \$opt_unapplied, |
... | ... | |
527 | 523 |
dbupgrader => $dbupgrader, |
528 | 524 |
type => $opt_type, |
529 | 525 |
description => $opt_description, |
530 |
encoding => $opt_encoding, |
|
531 | 526 |
depends => \@opt_depends) if ($opt_create); |
532 | 527 |
|
533 | 528 |
if ($opt_client && !connect_auth()->set_client($opt_client)) { |
Auch abrufbar als: Unified diff
scripts/dbupgrade2_tool.pl: kein Kontrollfeld fürs Encoding erzeugen
Es wird nur utf8 unterstützt. Das Encoding-Kontrollfeld ist kein gültiges Feld
mehr in den Upgrade-Dateien. Deshalb wird es nicht mehr erzeugt und das Encoding
kann auch nicht mehr als Parameter mitgegeben werden.