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         --no-batch-alters    Do not clump multile alters to the same table into a
36                              single ALTER TABLE statement where possible.
37         --quote=<character>  Use <character> to quote all table and field
38                              names in statements
39

DESCRIPTION

41       sqlt-diff is a utility for creating a file of SQL commands necessary to
42       transform the first schema provided to the second.  While not yet
43       exhaustive in its ability to mutate the entire schema, it will report
44       the following
45
46       •   New tables
47
48           Using the Producer class of the target (second) schema, any tables
49           missing in the first schema will be generated in their entirety
50           (fields, constraints, indices).
51
52       •   Missing/altered fields
53
54           Any fields missing or altered between the two schemas will be
55           reported as:
56
57             ALTER TABLE <table_name>
58               [DROP <field_name>]
59               [CHANGE <field_name> <datatype> (<size>)] ;
60
61       •   Missing/altered indices
62
63           Any indices missing or of a different type or on different fields
64           will be indicated.  Indices that should be dropped will be reported
65           as such:
66
67             DROP INDEX <index_name> ON <table_name> ;
68
69           An index of a different type or on different fields will be
70           reported as a new index as such:
71
72             CREATE [<index_type>] INDEX [<index_name>] ON <table_name>
73               ( <field_name>[,<field_name>] ) ;
74
75       ALTER, CREATE, DROP statements are created by
76       SQL::Translator::Producer::*, see there for support/problems.
77
78       Currently (v0.0900), only MySQL is supported by this code.
79

AUTHOR

81       Ken Youens-Clark <kclark@cpan.org>.
82

SEE ALSO

84       SQL::Translator, <http://sqlfairy.sourceforge.net>.
85
86
87
88perl v5.36.0                      2022-07-22                      SQLT-DIFF(1)
Impressum