1SQLT-DIFF(1)          User Contributed Perl Documentation         SQLT-DIFF(1)
2
3
4

NAME

6       sqlt-diff - find the differences b/w two schemas
7

SYNOPSIS

9       For help:
10
11         sqlt-diff -h⎪--help
12
13       For a list of all valid parsers:
14
15         sqlt -l⎪--list
16
17       To diff two schemas:
18
19         sqlt-diff [options] file_name1=parser1 file_name2=parser2
20
21       Options:
22
23         -d⎪--debug   Show debugging info
24         -t⎪--trace   Turn on tracing for Parse::RecDescent
25         -c⎪--case-insensitive   Compare tables/columns case-insensitively
26         --ignore-index-names    Ignore index name differences
27         --ignore-constraint-names   Ignore constraint name differences
28         --mysql_parser_version=<#####> Specify a target MySQL parser version
29                                        for dealing with /*! comments
30         --output-db=<Producer>  This Producer will be used instead of one
31                                 corresponding to parser1 to format output
32                                 for new tables
33         --ignore-view-sql    Ignore view SQL differences
34         --ignore-proc-sql    Ignore procedure SQL differences
35

DESCRIPTION

37       sqlt-diff is a utility for creating a file of SQL commands necessary to
38       transform the first schema provided to the second.  While not yet
39       exhaustive in its ability to mutate the entire schema, it will report
40       the following
41
42       * New tables
43           Using the Producer class of the target (second) schema, any tables
44           missing in the first schema will be generated in their entirety
45           (fields, constraints, indices).
46
47       * Missing/altered fields
48           Any fields missing or altered between the two schemas will be
49           reported as:
50
51             ALTER TABLE <table_name>
52               [DROP <field_name>]
53               [CHANGE <field_name> <datatype> (<size>)] ;
54
55       * Missing/altered indices
56           Any indices missing or of a different type or on different fields
57           will be indicated.  Indices that should be dropped will be reported
58           as such:
59
60             DROP INDEX <index_name> ON <table_name> ;
61
62           An index of a different type or on different fields will be
63           reported as a new index as such:
64
65             CREATE [<index_type>] INDEX [<index_name>] ON <table_name>
66               ( <field_name>[,<field_name>] ) ;
67
68       "ALTER/DROP TABLE" and "CREATE INDEX" statements are not generated by
69       the Producer, unfortunately, and may require massaging before being
70       passed to your target database.
71

AUTHOR

73       Ken Y. Clark <kclark@cpan.org>.
74

SEE ALSO

76       SQL::Translator, <http://sqlfairy.sourceforge.net>.
77
78
79
80perl v5.8.8                       2007-10-24                      SQLT-DIFF(1)
Impressum