Revision 3d145cb7
Von Sven Schöling vor etwa 13 Jahren hinzugefügt
scripts/rose_auto_create_model.pl | ||
---|---|---|
296 | 296 |
class is stable, and won't change behind your back in response to an "action at |
297 | 297 |
a distance" (i.e., a database schema update).> |
298 | 298 |
|
299 |
Unfortunately this ready easier than it is, since classes need to get in the
|
|
300 |
right package and directory, certain stuff need to be adjusted and table names |
|
299 |
Unfortunately this reads easier than it is, since classes need to go into the
|
|
300 |
right package and directory, certain stuff needs to be adjusted and table names
|
|
301 | 301 |
need to be translated into their class names. This script will wrap all that |
302 | 302 |
behind a few simple options. |
303 | 303 |
|
304 |
In the most basic version, just give it a login and |
|
304 |
In the most basic version, just give it a login and a table name, and it will |
|
305 |
load the schema information for this table and create the appropriate class |
|
306 |
files, or update them if already present. |
|
307 |
|
|
308 |
Each table has two associated files. A C<SL::DB::MetaSetup::*> class, which is |
|
309 |
a perl version of the schema definition, and a C<SL::DB::*> class file. The |
|
310 |
first one will be updated if the schema changes, the second one will only be |
|
311 |
created if it does not exist. |
|
305 | 312 |
|
306 | 313 |
=head1 OPTIONS |
307 | 314 |
|
... | ... | |
328 | 335 |
=item C<--dry-run> |
329 | 336 |
|
330 | 337 |
Do not write back generated files. This will do everything as usual but not |
331 |
actually modify any files.
|
|
338 |
actually modify any file. |
|
332 | 339 |
|
333 | 340 |
=item C<--diff> |
334 | 341 |
|
335 |
Displays diff for selected file, if file is present and never file is
|
|
336 |
different. bware, does not imply C<no-commit>.
|
|
342 |
Displays diff for selected file, if file is present and newer file is
|
|
343 |
different. Beware, does not imply C<--no-commit>.
|
|
337 | 344 |
|
338 | 345 |
=item C<--help, -h> |
339 | 346 |
|
Auch abrufbar als: Unified diff
Doc update