sqlidiff --schema question

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

sqlidiff --schema question

Mark Wagner
I was surprised to see sqldiff --schema not report column constraints as
schema differences.  Or am I missing something?

$ echo .schema | sqlite3 /tmp/f1.db
CREATE TABLE t (foo text unique);

$ echo .schema | sqlite3 /tmp/f2.db
CREATE TABLE t (foo text);

$ sqldiff --schema /tmp/f1.db /tmp/f2.db
$
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: sqlidiff --schema question

Mark Wagner
Just pining on this in case anyone knows more... ?

On Tue, Aug 7, 2018 at 2:00 PM Mark Wagner <[hidden email]> wrote:

>
> I was surprised to see sqldiff --schema not report column constraints as
> schema differences.  Or am I missing something?
>
> $ echo .schema | sqlite3 /tmp/f1.db
> CREATE TABLE t (foo text unique);
>
> $ echo .schema | sqlite3 /tmp/f2.db
> CREATE TABLE t (foo text);
>
> $ sqldiff --schema /tmp/f1.db /tmp/f2.db
> $
>
>
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: sqlidiff --schema question

Richard Hipp-3
In reply to this post by Mark Wagner
On 8/7/18, Mark Wagner <[hidden email]> wrote:

> I was surprised to see sqldiff --schema not report column constraints as
> schema differences.  Or am I missing something?
>
> $ echo .schema | sqlite3 /tmp/f1.db
> CREATE TABLE t (foo text unique);
>
> $ echo .schema | sqlite3 /tmp/f2.db
> CREATE TABLE t (foo text);
>
> $ sqldiff --schema /tmp/f1.db /tmp/f2.db
> $

Correct.  sqldiff appears to only look at the column names, not constraints.

I think it will pick up if you add an extra UNIQUE index.

--
D. Richard Hipp
[hidden email]
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users