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

DESCRIPTION

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

AUTHOR

79       Ken Youens-Clark <kclark@cpan.org>.
80

SEE ALSO

82       SQL::Translator, <http://sqlfairy.sourceforge.net>.
83
84
85
86perl v5.12.0                      2009-08-18                      SQLT-DIFF(1)
Impressum